Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Recommendations for client-side state management

by Anonymous Monk
on Nov 23, 2011 at 08:11 UTC ( #939618=note: print w/replies, xml ) Need Help??


in reply to Recommendations for client-side state management

The problem is choice ;D

This is session management, I remember reading about it from merlyns stonehenge web techniques columns

You only use a sessionid (only thing in a cookie) to identify a user (merlyn calls it branding a browser) -- one firefox.exe instance

You use this sessionid to retrieve a user cache object

And then, when a user starts a new form, a new uniquely named form, he gets a unique-form-id, and you stuff it in the users-cache

Each different form has its own form name, gets its own different unique key

You can pass this form-session-id around in a hidden field

You can use an abstraction HTML::FormFu::Element::RequestToken - Hidden text field which contains a unique token

Each time a user starts a form, you give him a new one

You can ask him to continue an old one

And then, like a shopping cart, you can offer the user a glimpse into his cart/cache, he see how many forms he started, how far along he is, if he wants to continue editing a form, before final checkout/submission

Hello shopper, your form-favorite-candy-Q9ef93kdkdlkj3000 started last week is only on page 3 of 12 pages , want to continue?

The user can start many forms simultaneously, one for each browser window or tab, they're all kept separate

You can setup cron job, to periodically empty old forms, expire them, and what not ... CHI can help

I hope I've communicated the concept sufficiently

For clarification and other ideas you probably might find mod_survey and/or some shopping cart diagram possibly helpful :D

Yes I English
  • Comment on Re: Recommendations for client-side state management

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://939618]
help
Chatterbox?
[robby_dobby]: I was falling asleep at my chair and threw out that one bit about participating in a YAPC. Things went from there :-)
[erix]: never too late to pull legs
[LanX]: Official YAPC Africa 2013 Announcement
erix always game to pull legs from sleeping cells
[erix]: hm nice might do a spot of diving - Red Sea is said to be beautiful
[LanX]: well too many terrorist tourists
[erix]: I guess I can pass for a native
[LanX]: talking about destruction of diving spots
[LanX]: Nodes to consider
[erix]: oops - got to run, see you later

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (13)
As of 2017-04-24 16:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (442 votes). Check out past polls.