Camillia
asked on
MVC - where to save the session data?
This guy on our team is working on a form application. Lots of fields in this form. Employee info, address, stuff.
He doesn't have "you're timing out" popup. As user goes from page to page, he does NOT save the information in database. He saves the fields data user populates in server session
So, user times out and they don't know they've timed out... user clicks to another page after 20 mins whatever and they've lost their data.
Solutions
1. My manager says to use the browser session to store the data until user clicks submit
2. Developer says he can extend the session timeout but he says this will affect all users and will take up resources. He says at most..5 people are using this application but has lots of fields for user to populate
3. He says he can have "you're timing out" popup but even if he does....and user times out... the data is gone, no?
4. We can't have viewstate (my manager mentioned this)....this is MVC
5. I say at each step, when user clicks "Next"... data should be saved in a temp table in the database. User logs back and can pick up where they left off.
What should we do? use browser session? save in DB?
He doesn't have "you're timing out" popup. As user goes from page to page, he does NOT save the information in database. He saves the fields data user populates in server session
So, user times out and they don't know they've timed out... user clicks to another page after 20 mins whatever and they've lost their data.
Solutions
1. My manager says to use the browser session to store the data until user clicks submit
2. Developer says he can extend the session timeout but he says this will affect all users and will take up resources. He says at most..5 people are using this application but has lots of fields for user to populate
3. He says he can have "you're timing out" popup but even if he does....and user times out... the data is gone, no?
4. We can't have viewstate (my manager mentioned this)....this is MVC
5. I say at each step, when user clicks "Next"... data should be saved in a temp table in the database. User logs back and can pick up where they left off.
What should we do? use browser session? save in DB?
ASKER
#1 . I think my manager meant in the page itself. If we want to save in a local storage...what are our options?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
let me see
ASKER
thanks, passed on the info.
2. Sure it will take up resources. Will it negatively affect users? Are we talking like 50,000 fields per user? It's doubtful that 10 - 20 fields will result in a significant performance issue...unless your server is woefully under spec'd.
3. Well yeah. That's what happens when the session times out. You can prolong this by pinging the session every so often, since session has a sliding timeout.
4. No, and why on earth would you?
5. You certainly could. You can even have session state itself stored in a database. Obviously this is slower since there's a database call. But it can also be scalable if you end up in a load-balanced web server layout.