[AWS] AWS - maintain state between server and client
Pascal Obry
pascal at obry.net
Thu Apr 8 15:52:09 CEST 2010
Thomas,
> But today I hit my first wall: Maintaining state. It appears there are
> no cookie support in AWS, which makes it very hard to solve some
> specific problems regarding user interaction. I have an app with lots
> of small GUI elements, which users can toggle on/off,
> minimize/maximize and drag around in the viewport. The settings for
> these widgets are currently set in cookies, because there's no login.
> Users just access the app, mess around and leave again. When they come
> back later, all the GUI elements is set as they were left during their
> previous visit.
Indeed not direct cookie support. No need to mess with cookie as AWS will
do that for you. AWS send a cookie behind the scene to record a session
with the web browser. At the application level the session variables are
stored into a key/value table. See AWS.Sessions. See the callback
in demos/multiple_session.adb for a simple counter.
> So my question is: Are there cookie support in AWS, or will it be added later?
No. But not needed as the necessary feature is provided by a higher level
API. Note that it is still possible to mess with cookies by sending specific
headers. But this is not encouraged.
> Thank you for an excellent piece of software, which hopefully, given
> time, will completely replace my old/crufty PHP/XSLT setup.
Thanks for the nice words.
When you are familiar with the basic AWS API may I suggest that you have
a look at the Web_Block support. With this it is possible to componentize
a Web application. This is used in the Vision2Pixels image critics Web
application. You can see the sources here:
http://git.savannah.gnu.org/cgit/v2p.git/
Pascal.
--
--|------------------------------------------------------
--| Pascal Obry Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--| http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595
More information about the AWS
mailing list