[Seaside] Session accesible from the model of an application

Göran Krampe goran at krampe.se
Wed Apr 18 09:08:05 UTC 2007


Hi!

> Hi Sebastian, I have pondered this question for reaching my Magma
> session from my domain without diectly referencing them.
>
>   http://wiki.squeak.org/squeak/5605
>
> The ideas may translate to Seaside or other "sessions"..

Just a note - in Gjallar we use DynamicBindings for this. So deep in the
domain model we can type "Q2Session current" (a subclass of WASession
which in turn holds a MagmaSession) and then do what we like with it.

A simpler approach avoiding DynamicBindings would be using the pattern
that is used in Seaside itself (or Pier) by subclassing Notifier etc.

Or did I misunderstand the question?

In Gjallar we fire off Magma transactions deep inside the domain model -
due to the design of Gjallar where we package all db modifications in
Q2Txn objects thus saving an endless history of all deltas (similar to
Prevayler etc).

regards, Göran



More information about the Seaside mailing list