[aida] Where to learn about sessions?

Janko Mivšek janko.mivsek at eranova.si
Thu Feb 5 14:12:39 CET 2009


Hi Herbert, I hope I'm not too late with the answer.

Herbert König pravi:

> JM> Aida creates for every new visitor a new session object and assign a
> where does this happen? Or to ask more correctly where do I hook in
> the code which creates a new instance of my model

Put a lazy initiated method to the extension of WebSession in your
package. Like #mySessionRoot which will instantiate the root to sessions
userValues, when first called from your app:

	self session mySessionRoot

Session is otherwise created (or found the existing one) in
AIDASite>>answer: where you have:

	session := self sessionManager findOrMakeSessionFor: aRequest

> Do I need to make an EnterSite object which in its viewMain creates a
> new model and redirects there like you describe later? Or is there a
> ready made way to do this?

I can't remember better way to tho the redirection so ye, make this
EterSite redirector to redirect to above session #mySessionObject.


> JM> For redirection I propose to make a special Redirector and register it
> JM> as '/', then this redirector just redirects to the object stored in
> JM> user's or session's userValues.

> Register with AidaSite... urlResolver registerURL:forObject:? Would
> this be my EnterSite object?

Yes, and register your EnterSite object only once, that is have only one
instance of EnterSite (a singleton).

Janko

-- 
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si


More information about the Aida mailing list