>I just wanted to ask this:
>
>Am I the only one, or do other notice that the application object becomes a monster code repository. Every function that does not really relate to some other object, gets popped into the oApp. Wrappers for more complex methods of sub-objects, application-wide procedures and values etc.
>
>It seems I have over 20 custom methods on my oApp.
>
>Am I doing it wrong?
I seperate these into seperate objects that get tied into the oApp objects
there are several types of objects that I add
behavioural (e.g. oSecurity), general procedures like oUtils, geenral variables and constants (oPreferences)
the application object itself serves both as a general/main handler in a chan of resposibility pattern we implemented and as an publisher for publisher/subscriber pattern
thus the application object doesn't do too much on it own but rather serves as an information desk coordinating all the other objects to work together
naturally this is just my view on things - other ways may be just as good or better :)
Arnon
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