Of topic but important nevertheless:

About the only object you ever want to put in the session IMHO is the logged in user and its credentials. Even if you have a very small site with only one important model you should not put it in the session. There are 2 problems with this approach:

- Technically you get problems because access to the session is not thread safe. - Usability suffers because the user can no longer have multiple tabs open in the same site and try out different things.

Well, ok, /sometimes/ you want to prevent the latter to keep things simple for the user. A shopping cart is probably the best example.

Regards,
   Erik.


Alex Objelean wrote:
I also like the approach of pushing every functionality in separate
components (Panels), it gives me the flexibility of composing pages with any
combination of this components. For instance, if I have Login functionality,
I create the LoginPanel and LoginPage. This approach allows me to add other
Panels (if needed) to LoginPage.

Regarding storing the primary model to the base page, I would suggest using
a custom session for storing it. This way you can benefit from strongly
typed objects and be able access it anywhere in your application.

Alex

--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to