Jim,
Well, I use Parameter Objects for a long time now, mostly as a standrd way
of passing information between objects (for intra-object calls I still use
direct calls)
my VFP6 implementation of this does not use AddProperty but rather an
implementation o an auto-dimentioning "collection" (a simplified version of
that class will be in the next VFUG NL if anyone is interested)
I have several "specific" sub-classes of this object that have sppecialized
methods wrapping this API for the commun parameter passed, these methods
also perform basic validation of the parameters and deal lwith asigning
default values for missing parameters
basically it is encapsulation of the whole parameter passing schema
There are several advantages (for me anyway) for example the ability to
return multiple values , encapsulated in such an object from any method
other is that as a message ripples through the app (I also implemented some
sort of messaging) any object that has interest in parts of the objects can
read and write it , while ignoring parameters it doesn't need or that thier
use is not implemented yet with out any additional code
again, since a message can go to multiple objects, there is a real advnatage
in having a single place to make updates if more infomation is added to the
parameter object
Arnon
>
>Just to restart an old thread, what are your thoughts about Parameter
objects now with the AddProperty() method on every class? It sure makes
them much more interesting to me since I can now create one single base
parameter class and use everywhere I want.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement