Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
'Double duty' business objects
Message
De
20/12/2001 09:20:00
David Gibson
Beacons Software
Royaume Uni
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
'Double duty' business objects
Divers
Thread ID:
00596733
Message ID:
00596733
Vues:
54
Has anyone tried adding a session object to a form?

I am looking into ways of creating 'double-duty' business objects i.e. middle tier objects that can talk to FoxPro front ends one way, but to other front ends in another way.

One problem I'm trying to solve is achieving the same level of performance as in a monolithic application, when using an n-tier design, if it so happens that all tiers are written in FoxPro.

Here's the interesting bit, the following two lines of code give completely different outcomes:

Thisform.oDataServer = NEWOBJECT("FpDataServer", "Libs\DataServer.prg")

Thisform.NewObject("oDataServer", "FpDataServer", "Libs\DataServer.prg")

(Where FpDataServer is a class definition is based on a Session Class)

The first case using the NEWOBJECT() function creates two separate datasessions, one for the form and one for the session object, I think this is the behaviour I was expecting to see.

But the second case using the NewObject() form method creates only one 'merged?' datasession with tables opened by the form and by the session object all mixed in together.

Now this looks exciting to me as it allows the form to directly display the data without having to use some mechanism to pass it between the layers - my big question is - is this kind of behaviour supported and can I rely on it being available in the future? Could someone from Microsoft comment on this?

Thank you for your time

David
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform