Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to pass data from one object to another
Message
 
 
À
05/12/2001 16:10:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00589517
Message ID:
00590185
Vues:
39
Ok, here goes. I CC'd the people that are in the CC list so I only have to type this once. :)

The application is just one form that allows users to narrow down data for a report. They could select one record, or all of them depending on what selection criteria they put in.

The thing that makes this a bit more complicated is that we want this to work with a whole bunch of different systems' data. So I'll have one bit of code for getting the info from ACCPAC's Pro Series, and another for getting from Redwing, etc. Not all the data is VFP data, either. It could be in any format that is accessable to VFP.

So what I was trying to do is make it an n-tier app, even though it's not a very complex one. Since this is my first time doing something like this, I've been feeling my way along trying to figure out the "proper" way of doing things. What I ended up with is the UI in the form, a local data access object that deals with the data in a VFP cursor, and a remote data access object that is subclassed into a bunch of objects for dealing with fetching the data from the tables. Only one of these RDAs will be used at a time, so I stored the name of the class in a variable and create an object from there.

The problem I am running into is that I thought I could use XML to send the data from the RDA into the LDA as a string and have the LDA fill the local VFP cursor from that. But when I started testing my code, I discovered that is way too slow. So now I'm trying to figure out how I should be getting the data there.

It's physically possible for me to have the RDA write straight to the local cursor, since it's all called from the same form, anyway. My concern was that if I did that I would be screwing up the whole n-tier idea. Since this isn't being written on the client's dime, I figured it was a good time to learn how to do things the right way. So I'm trying to avoid kludging things to make them work and really do it right. Unfortunately, I'm rather lost on what's right. XML is way too slow, and ADO seems way too complicated for this. I feel like I'm missing some parts of the puzzle.

Does that make more sense, now?

Thanks,

Michelle



>I think the variety of responses you're getting reflects the old blind man and elephant routine.
>
>Your response to Jim Booth clears things up a bit. As I understand it, you're developing a traditional database application, but trying to use object oriented principles for data access.
>
>It appears that you've developed classes which could be called "business objects."
>
>If that's the case, you don't want to make this a lot more complex than a typical VFP app.
>
>Is that accurate? If not, then more details about your development might help us home in.
>
> Jay
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform