At 08:14 14.03.2005, Craig McClanahan wrote:
For a developer, though, you should train yourself to good habits in
the first place -- use request scope for *everything* unless it
absolutely must be saved, on the server side, in between requests from
the same user.

This sounds like common-sense but is only feasible in theory; that's because in non-trivial web-apps almost all the interactions are some kind of a dialog spanning multiple requests with the user and inevitably require session-stored data between request. Cleaning such data when the "dialog" ends becomes a pain.
I hope that the "Dialog Controller" in the forecoming Shale will address this problem and provide the means for a "dialog-local session" that will automatically be released once the dialog completes. Furthermore, once a user is in the middle of such a pageflow, it shouldn't be possible to leave (requesting another dialog sequence) until the current one finishes.
I've once worked with a home-made web framework which implemented such behavior (like a state machine) where the entire application was divided into states (each having a corresponding view), each state could have transitions (a transition executing an action) to other states or to another sub-application. Each "state machine" had it's own separate session which was removed on execution end. Between state-machines parameters could be sent by-value copying from one session to the other. All this was specified in an external xml doc. Too bad it was lacking a system for automating request and session parameters retrieval (like the ActionForms in Struts).
That is the behavior that I would personally like in Shale, because I think it allows for much better design and reuse.


Radu



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



Reply via email to