[aida] Aida application instance data
r.j.rothwell at gmail.com
Tue Feb 5 23:45:28 CET 2008
Thanks for the help...
That's completely right and expected Aida behavior, because from both
> browsers you look at the same domain object. But see the further answer
> Do you mean different browser windows of the same browser (just FF for
> instance) or two different browsers, like IE and FF? In first case it is
> natural that you see just one session because by just opening a new
> window you don't open a new session but reusing an existing one. In
> later case you should have two separate sessions.
Sorry. I DO see the behavior you described. Two different browsers create
two different applications, but multiple instances of the same browser
create the same application. I didn't understand that sessions were reused
You need to have different domain object for different sessions in that
> case. As I described in previous mail you can use your App to hold that
> domain object temporary or use WebSession or WebUser userValues for
> permanent storage of such session/user specific domain objects.
Let's go with a shoping card analogy. You'll make a new ShopingCard and
> register it in WebUser userValues until user checkout. At checkout
> you'll add it to anOrders domain object. That's because you need to
> store that shopping card permanently for a long time.
> But if you don't care, you can store simply in an OrdersApp instvar
> newOrder, for instance. That's because anORdersApp will be created for
> each session separately, so you'll have and isolation of shoping card
> Later case is preferred for short-living temporary state while former
> for long-living ones , as I mentioned already.
Ok...thanks...I am getting something to work now if I use two different
browsers (IE vs FF) combined with an App instvar.
It is very good that you raised that question because it seems that
> many people have the same and it should be addressed in a tutorial or
maybe in FAQ.
Have you seen Wink?
Maybe I'll use it as a test case for my first tutorial and see what you
think of it!
Sorry for the confusion...!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Aida