ANN: CGI tutorial online

Gregory Lypny gregory.lypny at videotron.ca
Wed Apr 28 14:46:57 EDT 2004


Hi Jacqueline,

> On 4/27/04 3:51 PM, Gregory Lypny wrote:
>
>> Excellent tutorial Jacqueline!  Your seminar notes are very well 
>> written.
>
> Thanks.
>
>>     I'm also wondering how stacks as cgi's handle globals (do they 
>> exist
>> only for each instance the engine is called?) and how I can create the
>> equivalent of tokens (client specific values that are alive for the
>> duration of their session).
>
> Every time a CGI runs, the engine starts up, runs the script, and 
> quits.
> Any globals will only be available during that brief time. There is
> little call for globals in CGIs really, because of this. The only time
> I'd think you would need one is if you are using a stack to process the
> request and you need to carry a value between two different scripts in
> the stack.

	That's what I suspected, and thanks for confirming.  What is or will 
be critical for me is to devise a way to ensure that there aren't 
update anomalies, that is, where revisions to a stack by one client 
conflict with those of another.  My clients will be participating in an 
experimental online asset market, so the transactions must be handled 
strictly in order of arrival; otherwise, for example, one person may 
end up buying at a stale asking price.

>
> All CGIs suffer the same limitations though, and that's why cookies 
> were
> invented to store persistent values. LibCGI has handlers that allow you
> to create and set cookies, so that's probably how I'd do it.

	I'll check that out.

		Greg



More information about the use-livecode mailing list