Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning a value from a form in a class
Message
From
21/06/2000 11:47:32
 
 
To
20/06/2000 16:55:30
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00380150
Message ID:
00382724
Views:
25
Hi Ken,

As to AddProperty, why is it wrong from an OOP perspective?

In fact, I would argue that using AddProperty is GOOD OOP practice. Standard OOAD/OOSE practice recognizes two types of attributes: 1) class attributes and 2) instance attributes. In VFP terms, this can be seen as 1) persistant object properties defined when the object is defined or (ack) public variables and 2) properties instanced by the object itself when needed (AddProperty!) or private and local variables.

Check out Object-Oriented Software Engineering - A Use Case Driven Approach, by Ivar Jacobson, pages 245-249. Jacobson is the father of OOAD and one of the Three Amigos.


>Mike - any OOP purist will tell you AddProperty stinks - I don't claim to be an oop purist - but as a general rule - well - AddProperty stinks - it is a bandaid for poor design somewhere else down the chain.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform