Saying No to Properties

Post Reply
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Saying No to Properties

Post 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-n ... 920?pgno=1

Regards,
James
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Saying No to Properties

Post 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 :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Saying No to Properties

Post 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-n ... 920?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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Saying No to Properties

Post 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 :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply