Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Proper Encapsulation Techniques?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00131613
Message ID:
00133274
Vues:
13
>I do have one question: Do you use data behavior classes? If so, wouldn't that be the object that decides how to get the next record?

Michael,

In an N-Tier system the bizobj is the data behavior object. I may use a form class that has a GoNext emthod, but if the form is using a bizobj that method will simply delegate to the bizobj.

As Steve Black has said, the ultimate value of business logic objects is not a forgone conclusion, sometimes they may be the best thing ever done and at other times they will be in your way.

I find them best suited for the situation where multiple divergent interfaces are required to access the same data. In this case they provide a level of insulation between the data and the interfaces where rule enforcement can be done without requiring the code for it be repeated in each and every interface.

I still do rule enforcement in the interface because my philosophy is that the user should be assisted to get thing right before any other layer of the system rejects the data.

If you have ever created a field validation rule in a VFP database, then bound a contrl to that field and written code in the contrl's Valid event, you will see that the database rule fires before the valid event of the control. With a bizobj between the control and the database this does not happen and your control's valid event can assist the user in getting the data right before it is submitted to the database.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform