DotnetDude
DotnetDude

Reputation: 11807

JQuery Sortable design question

I am creating a web page in which users can click on a + button to add a new text box, enter some text and choose to reorder textboxes (I plan on using JQuery sortable). They can also delete textboxes as and when they please.

My question is should I be persisting the changes they are making as and when they make a change (by doing a ajax call) or should I have a Save button that the user would click to save the changes they have made. In the latter approach, I need to maintain all the changes on the client side and persist the state when they click on Save (and I feel this approach is more performant)

Any thoughts on what approach to use?

Upvotes: 1

Views: 155

Answers (3)

Mike G
Mike G

Reputation: 4793

This issue actually has nothing to do with jQuery - it is a usability design issue.

From a user perspective, I like how Google Docs saves my progress as I go along. As a developer, I know that is more complicated to code.

You ultimately have to think about how the user will be using this table - are they using it as a scratchpad and want the control of saving? Or do they need up-to-the-second saves done for them?

Upvotes: 0

Ewan Heming
Ewan Heming

Reputation: 4648

I would save the changes on the client and possibly have some form of 'save draft' function that periodically saved the data to a temporary location on the server so the user doesn't loose all their data if something goes wrong. Alternatively, cookies could be used as another temporary storage area.

Upvotes: 0

rick schott
rick schott

Reputation: 20617

It depends on if the UI leads the user to believe their changes will or will not be lost. Meaning, if they perform the sorts, deletes...etc and close the browser or loose connectivity for whatever reason, will they be upset about losing those changes? If yes, then AJAX and persist all changes.

Upvotes: 1

Related Questions