Information générale
Catégorie:
The Mere Mortals Framework
Dan,
First of all ‘full discloser’ these comments are being made by a person who’s experience with MM is measured in hours, and while he has been working with VFP and OOP for many, many years most likely know less then he think he does <s>
OK this is all IN MY OPINION, but based on years of hard study and experience.
If a program starts at ‘A’ and then calls ‘B’ and then calls…. ‘Z’ ‘A’ is the highest module ( class program etc. ) and ‘Z’ is the lowest. Lower level modules should not call, ask for information etc. of higher modules. GoApp (A) is a very high module therefore the bizobjs ( let us call them B ) should not ask for things like goapp.projectnumber.
Ok then how does B get the information needed, 2 suggestions
1) Higher level modules GIVE the information to the lower level object.
Ex:
oBiz = CreateObject(…..
oBiz.Set_projectnumber( This. Projectnumber )
2) Both the high and low level object share a common lower level settings object.
This way the ‘B’ bizobject is not ‘tied’ to the existence of goApp. Good OOP should allow for reuse, limit the ties between lower and higher objects, the calls / information flow should only be one way.
In reality MM appears to be breaking my recommendation therefore maybe one should not ‘fight’ the framework.
Anthony
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