Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Frameworks Revisited!
Message
De
05/02/1999 12:45:58
 
 
À
05/02/1999 11:26:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
00182668
Message ID:
00184433
Vues:
19
>John,
>
>I believe that this is a crucial and critical piece of information.
>
>Where can I obtain some confirmation that VFP will, under any circumstance (or even under what particular circumstances) create re-entrant (ie "stateless", to use your (and possibly the proper) terminology) EXEs (and DLLs?)?
>
>Surely this must be documented somewhere, and I have yet to come across anything wich even suggests it to be true.
>
>Jim N

This is exactally what you are doing when you write application for the web using Web Connection, or even when using FoxISAPI...

You have to write your code so that nothing within the object is expected to persists. This doesn't mean that you can persist information with a statless object, you have to store the information and relate it to the user or client as opposed to the current running code.

For eample, when you write an exe that has a UI that is run on someones PC, you can store info in goAPP.UserID since this application always maintains its state, it has one user, and it can store info within it self.

With a stateless object you can't do that. You have to query the client... then restore session info you might have stored about that client. Some pseudo code follows...

Ask client for it's session id?
If client doesn't have session id, assign a session ID, request login.
Store login info with session ID.
Do thing this code does.
Exit

SO... this object is stateless... since several clients are using its services it can't store info within itself that is related to something outside of itself.

With web programs you use the idea of Sessions. You maintain a database of sessions with info that your ap as a whole may need to access. Every object would have to restore this session info and store any changes to it.

This is how I can have a shopping cart, many shopping carts, call processed with the same code. At any time a client could call the 'AddMyTotal' method... that method would have to ask... ok, what is your cartid... then look up that info in a database and add up the total.

You can certainly do this with a VFP ap.

BOb
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform