Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Application object
Message
De
04/12/1998 03:07:59
 
 
À
03/12/1998 13:57:30
Tim Hockin
Illinois State U - Residential Computing
Normal, Illinois, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00163769
Message ID:
00163983
Vues:
20
>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
Fil
Voir

Click here to load this message in the networking platform