Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning a value from a form in a class
Message
De
21/06/2000 11:47:32
 
 
À
20/06/2000 16:55:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00380150
Message ID:
00382724
Vues:
22
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform