Depends. 
The best solution is no state.

There are three issues, that in some cases are tied together.
1. Identifying your state - how secure does this have to be.
2. Where to store it (if at all).
3. How much state information is required

1Q.
How much state information? Smaller the better, can it be reconstructed? For
small amounts I favour storing state on the client eg URL/Form rewriting,
Cookies.

2Q
Are you running clustered web servers, or only a single web server?
This favours DB's and URL/Form rewriting and Cookies. For larger amounts of
Info, store in a DB.
Beware of issues with frames and clustered web servers. A single Web client
can issue several simultaneous requests, that can go to different web
servers (depends on configurations). So who then has the current valid state
information? This gets really tricky - I know I've had to deal with it. It
ain't pretty.

3Q
Expected number of users? How does the application have to scale?

I have used all of the following (at different times and in combination) -
URL rewriting, Form hidden fields, SQL Databases and In memory data
structures.

Myles.



-----Original Message-----
From: James F Sugrue [mailto:[EMAIL PROTECTED]
Sent: Friday, 24 October 2003 11:08
To: Multiple recipients of list Delphi
Subject: [DUG]: Maintaining State in Web Apps


Mornin All,
I have a WebBroker app that does user authentication etc. I have a few ideas
about maintaining user state, but was wondering how other people have done
it/do it.

It is a Kylix app, but should the same as Delphi Web Broker apps.
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to