Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with session class and data tier
Message
From
15/10/2002 09:37:49
 
 
To
07/10/2002 13:40:27
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00706657
Message ID:
00711284
Views:
18
Hi!!!

>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...
I'm trying to make a spanish framework :)

>>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.
Yes, the cursor is temporal, created for data object

>>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.
You are right, but data object is responsible to make data available
The biz object don't care about session, but data session linked to bizobject does
I have:

Interface (container base class)
|
|---> BizObj (custom) ----> Fields(custom)
|
|----->Data (custom) ------> session (session)

I make data as custom for visual editing.

>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?

Yes, but every grid is on distinct interface object, and interface class is responsible for instantiate the biz obj.
I want to reuse the interface objects, and when I drop an interface at design time on a form, the interface class have all the info that need to work.
Data object is responsible for open tables. Is that right?
If you have multiple sessions data object don't need to check if a table is already open, or problems with buffer mode.

TIA
Rodrigo Juarez
rodrigoj@azinformatica.com.ar

Para entender la recursividad, primero, hay que entender la recursividad.
Previous
Reply
Map
View

Click here to load this message in the networking platform