The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Editing with a web application

I wonder how to reproduce, using a web browser, the user experience of editing something in a desktop application.

To implement editing in a web browser, perhaps there are 3 options:

1) After each gesture that changes the document, post the changes back to the server and get a fresh (edited) copy of the document.

2) Similar to 1), except use Ajax: post the edits to the server, get edit results from the server, and apply the edit results to the document (without re-fetching the whole document).

3) After each gesture, edit the document in place (in the browser), without posting to the server. Then, sooner or later, have the user press a [Save] button which saves all changes to the server.

My guess (I haven't done this before) is that:

*  The disadvantage of 1) and 2) is that the server round-trip (even with Ajax) slows the application's interactivity/responsiveness.

*  The disadvantage of 3) is that if the user doesn't press the [Save] button (e.g presses the [Back] button or closes the browser) then changes are lost (not sent to the server).

Any suggestions? Would the best in fact be 3) rather than 2), but use a Javascript 'confirm' on the [Back] and [Close] events if there are unsaved changes?
Christopher Wells Send private email
Thursday, October 12, 2006
 
 
I like the way that gmail handles this.  I just type, (no round trips), then after a set time (I think a minute) it auto saves a copy in draft via ajax.  Kind of a trade off between 1,2 and 3.
Chris Hoffman Send private email
Thursday, October 12, 2006
 
 
I think you have to manualy set Word to auto save every X minutes.

I think that Christopher gave you a good combination of both. Maybe you can even let the user set if he would like the auto save function.
Jan Hančič Send private email
Friday, October 13, 2006
 
 
Woops, I meant Chris :)
Jan Hančič Send private email
Friday, October 13, 2006
 
 
Sitepoint's Ajax book had a chapter about Editing in Place. The sample code didn't work though and neither did mine :)

Autosave sounds like a good option.
mr clueless
Friday, October 13, 2006
 
 
Do just what a desktop application does!!

"Would the best in fact be 3) rather than 2), but use a Javascript 'confirm' on the [Back] and [Close] events if there are unsaved changes?"

So, you should *always* have the Javascript confirm on the OnBeforeUnload event.  Also have a manual save option.  Have a periodic background save *but* use that only for emergencies.  If I edit a document but I decide I don't want my changes, I should be able to close the browser or whatever and have those changes not be saved.  But if my browser crashes, it'd be nice to have some my old typing saved.  Just like I would have with Microsoft Word.
Almost H. Anonymous Send private email
Friday, October 13, 2006
 
 
How about buffering up the updates in a queue and having a background process pulling items out of the queue to update durable storage?  This should decouple the data entry process and the update process so that both can execute at their own rate.  It would make error handling a pain, though, and there would be a risk of lost work if the system crashed and the update process hadn't caught up yet.
Mr. Sleepy Send private email
Friday, October 13, 2006
 
 
You need to start by determining what the user experience should be. Should they have to perform some action to "save" their work or should it be invisible and automatic. This will depend on the sort of document being worked on. If it is being used to write code then the "save" should only happen when I say. If it is writing a blog post, automatic is ideal.
Neville Franks Send private email
Friday, October 13, 2006
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz