Page 1 of 1

Saying No to Properties

Posted: Thu Apr 25, 2013 2:03 pm
by James Bott
I just came across this interesting article promoting the idea of not using properties in classes. Before reading it I was very resistant to the idea, but the author has some good points.

Saying No To Properties
http://www.drdobbs.com/windows/saying-no-to-properties/240005920?pgno=1

Regards,
James

Re: Saying No to Properties

Posted: Thu Apr 25, 2013 2:40 pm
by Antonio Linares
James,

Good reflection, thanks for sharing it :-)

I think he is right, but maybe its quite difficult to change the object oriented concepts this late :-)

Re: Saying No to Properties

Posted: Thu Apr 25, 2013 6:55 pm
by Enrico Maria Giordano
James Bott wrote:I just came across this interesting article promoting the idea of not using properties in classes. Before reading it I was very resistant to the idea, but the author has some good points.

Saying No To Properties
http://www.drdobbs.com/windows/saying-no-to-properties/240005920?pgno=1

Regards,
James


Nothing new. At the very early days of object oriented programming we was told that classes should only offer services (i.e., methods). Later, programmers start to use properties, publicly visible and without any control (i.e., accessors). The result was an hybrid technology that is more pragmatic and less effective than pure OOP.

EMG

Re: Saying No to Properties

Posted: Thu Apr 25, 2013 8:29 pm
by Antonio Linares
I have not done a deep analisys of it, but I would say that it may increase the amount the code and not its reduction...

We manage a lot of datas. If they become non accesible, we reduce the access to query those values, and would have to be queried using methods and more over, we should have in mind all the possibilities that a user may need or consider.

Lets make a comparison with the iPad design (and similars):
How to reduce errors ? Automatizing processes (like automatic installation of an app, the app store, etc). Whats the real impact on users ? Less freedom (thats why iPads are so boring for me). I can only do what designers allow me to do, but they don't consider all that I would like to do :-)