Re: Sessionless Direct Actions
Re: Sessionless Direct Actions
- Subject: Re: Sessionless Direct Actions
- From: Pierre Frisch <email@hidden>
- Date: Sat, 31 May 2003 11:15:25 -0700
I don't have a simple example the best way to go about it is to start
by making your application session less. Overriding the
Application.createSessionForRequest() method is the best way to insure
this. By doing that you can be sure that all state is in the URL of the
Forms.
Then you look at the fetch for each request if you end up doing the
same fetch for each request then adding a session may be beneficial
create a session and store in it the object that you reuse from request
to request. In the direct action check out the session and verify that
the object are relevant with the state from the request and you are
good to go. You also should check that you recover properly when the
session has disappeared for whatever reason. This should be invisible
from the user.
Pierre
On Saturday, May 31, 2003, at 10:45 AM, Jonathan Fleming wrote:
From: Pierre Frisch <email@hidden>
To: Hsu <email@hidden>
CC: james o <email@hidden>, email@hidden
Subject: Re: Sessionless Direct Actions
Date: Sat, 31 May 2003 08:27:15 -0700
I would like to add just one thing. Sessions are not bad in
themselves and can bring quite a bit of speed improvement to a
DirectAction application by caching the objects an cutting the number
of fetches you need at each request.
With direct actions you can do just that use sessions as a cache, you
need to store the state in the URL or the form as usual but you
create a session and store a cache of what the user is looking at.
When you decode the URL look if you have the object in the session
this saves you quite a few fetches and still preserves the benefit of
the DirectAction session less design: the request does not fail if
the instance is restarted, the URL are bookmarkable.
Pierre
This is interesting how exactly do you do this? Got a simple example?
Jonathan F :^)
On Friday, May 30, 2003, at 08:25 AM, Hsu wrote:
DirectActions are typically sessionless; however, if you any
components, a session will be created for you. A session will also
be created if you invoke context().session();
Karl
On Friday, May 30, 2003, at 07:29 AM, james o wrote:
i have direct actions that get XML data from my WO application and
do nothing else.
is it possible to create DirectActions that don't create new
Sessions?
i guess i could run the direct action and then use
session.terminate() to close the session...
tia,
./james
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
--
The more people I meet, the more I love my battle-axe.
Homepage:
http://homepage.mac.com/khsu/index.html
--
On the other hand, you have different fingers.
Homepage:
http://homepage.mac.com/khsu/index.html
--
Ever been down South?
After a few days in the South, you begin to miss things, little
things like English and front teeth.
Homepage:
http://homepage.mac.com/khsu/index.html
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_________________________________________________________________
Get Hotmail on your mobile phone http://www.msn.co.uk/msnmobile
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.