[aida] Where to learn about sessions?

Janko Mivšek janko.mivsek at eranova.si
Sat Jan 24 23:34:36 CET 2009


Hi Herbert,

Herbert König pravi:

> my scenario is:
> A user logs in anonymously (or as a known user).

So it doesn't log in at all? Ok, it logs if it is already registered...

Aida creates for every new visitor a new session object and assign a
guest user to it (a single instance of WebUser for all such sessions).

So, you have sessions and you have users, where a guest user is for
anonymous sessions.

When that user log in, the session's user is changed from guest to that
user's WebUser. Sessions therefore stays the same. This also enables one
user to have many sessions, from many browsers, one from pc, another
from notebook...

> This creates a new instance of the model and leads the user into a
> fresh viewMain.
> 
> Do I have to create a new AIDASite?

No, not at all. You create a new model for each new session and register
it to session userValues, then you redirect him directly to that model.

When user will register himself, save this model to a user's otherValues
instead and use that one for further redirecting.

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

> Actually I need to, as I don't want the navigation bar of aidademo.

Subclass WebStyle and do your own layout there. It will suffice to do
your own #pageFrameWith:title:

> Add a new session to an existing AIDASite?

As said above, this is done automatically for every new visitor.

Hope this help a bit
Janko


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


More information about the Aida mailing list