Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with session class and data tier
Message
De
07/10/2002 13:40:27
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00706657
Message ID:
00708450
Vues:
14
>Hi!!
>
>I'm trying to make a 3 tier framework, have interface object, based on container, biz object based on custom and data object based on session.

Any chance you could use a 3rd party framework such as VFE or MM? They do this already, and would save you a lot of development time. Otherwise...

>When drop interfaces object on a form (at design time), the interface object instantiate biz object (at runtime), biz object instantiate data object (at runtime).

Right. I'm with you.

>I need to drop two interface objects in the same form, but has problems with data bind.

I wouldn't bind the grid directly to any data, other than a intermediate cursor.

>For example, I have grids in interface, and I set controlsource after open tables, but nothing happend.

Right. The Grid would be using the Form's data session.

>I thinks that is a datasession problem (my session objects have private datasession) but I can't see any workaround.
>
>I need that every biz objects have their own session, and grid controls can be bound to cursors in that session.

I don't see that business objects should care at all about sessions, actually. Nor should grids and business objects be coupled like that, IMO. The relationship between a Grid and a BizObj is, for example, that changes are passed to the bizobj for validation. And logic validation, not data validation. The data object is responsible for that, right? The bizobj passes the validation on the dataobject, but it can't care how the data object does that.

Walking through a scenario, let's say you have a form with two grids. One displays customers and one displays invoices. Do I understand you correctly, that you would like to add a Customer bizobj and an Invoic bizobj to the form (for example). When they're instantiated, they create their data objects. Then when a customer name is updated in the customer grid, the UI passes the validation to the bizobj, which then passes the validation on to the dataobject. If it's valid, the data object updates the data source. Is that roughly correct?

If I'm wildly off the mark, I'm sure you'll tell me. *s*
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform