Information générale
Catégorie:
The Mere Mortals Framework
Titre:
Is DoForm(…) the proper way to call a form in MM?
It looks like I should be using the DoForm( ) when I want to instantiate a form, correct? Is there a rule-of-thumb when not to use it?
Even better I guess would be to do this:
DoForm( goApp.oMMFactory.GetClassName( 'AboutForm' ) )
Since this is a new app should ALL DoForm use the factory? Would I be overusing the factory pattern if I did?
Couple of side questions:
1) Why is DoForm not a method of some class? That surprised me. No special reason just a feeling that it should have been more OOP ( Maybe I’ve OD on OOP <s> ) (Maybe a command pattern should be used? ) Has anyone run into a problem that they said to themselves if only DoForm was a Method ( or object ) ?
2) I noticed that the factory can either create the object or return the object name.
Is it really a factory ( Pattern ) when it does not create anything but just returns a name of a object? Seems like that is just a simple function call, that may be implemented using a strategy pattern.
I know I know stop trying to fight the framework, become one with the framework. <s>
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