Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Business objects newbie question
Message
De
31/03/2004 12:28:38
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00891196
Message ID:
00891216
Vues:
19
Pretty close, but you are linking the UI with the BO. Use a custom object for the BO then drop it on the form. Or, use a session object and instantiate it with CREATEOBJECT() in the Form.Init. The UI should only display information. All the smarts will be in the BO.

>I am thinking about how to create business objects (to paraphrase William Hunt, “I don’t have a formal computer training” <g>) and would like to know if I am on the right track.
>
>The following is a very simplified example.
>
>Say, I want to create a business object for conference room reservation program. One business object I will need is Reservation Class/Object.
>
>I think I will need to create a class (in VFP, based on a form class so that it would have private data session) with custom properties such as:
>Room No
>Reservation Date
>Time From
>Tim To
>Reserved For
>Etc.
>
>The class would also have methods, such as:
>Check if room already booked
>Save reservation.
>
>Here how the business object will be used:
>1. User enters information into a data entry form.
>2. Data entry form creates an object of the Reservation Class.
>3. Reservation Class object properties are then set with values from data entry form controls.
>4. Reservation Class method “Check if room already booked” is called.
>5. Reservation Class method “Save reservation” is called.
>
>Would the above description be “in line” with how to create business objects with VFP?
>
>Thank you for any comments. Also, if someone wants to recommend a basic/beginners book or a white paper on creating business objects, I would appreciate very much.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform