You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Early Morning <go...@gmail.com> on 2010/04/05 10:09:23 UTC

Best practice for dynamically storing state?

Hi All,

I have an application with a widget sidebar, with all the normal
capabilities (add/remove widgets for user, minimize, maximize, sort widgets,
etc.). I just wanted to ask what the "best practice" for storing the state
of these widgets to a DB is. The current implementation involves using an
Ajax call every time the state is changed (complete with a Loading
indicator), so that the state is saved to the DB. This seems a bit heavy to
me though, and doesn't seem that responsive (as the user has to wait every
time the state is changed).

The other option I was thinking of is to just save the state in the Session,
and persist upon logout. Would there be any problems with this approach
(memory-heavy)? Or are there other alternatives? I prefer to have the user
change state (sort, expand/collapse, etc.) anytime they like, which is why I
didn't go for the lock/unlock widgets approach (where you have to manually
save your widget state). If it makes a difference, I'm using wiQuery. Thanks
for any help!


Regards,

Ces