Undo in a Web Application

1,603 views
1,449 views

Published on

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,603
On SlideShare
0
From Embeds
0
Number of Embeds
28
Actions
Shares
0
Downloads
17
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Undo in a Web Application

  1. 1. Undo in a Web Application Chasen Le Hara BarCamp LA-4 November 4, 2007
  2. 2. The Problem • Accidents happen • Habits happen • Data loss sucks http://flickr.com/photos/wvs/141235163/
  3. 3. Is undo a solution? • Undo can recover deleted data • Undo can reverse changes made to data • Undo can make a user less fearful
  4. 4. How should a user interact with undo?
  5. 5. The back button? • Used for going to the previous page • Back button is for pages, not state • Wonʼt work (easily) with AJAX • Not readily apparent to the user
  6. 6. A proprietary interface • Control over when the option appears to users • In line with existing instances of undo
  7. 7. Undoʼs Scope
  8. 8. What should be undoable? • Not all actions can be undone • Purpose is to recover past data • Delete and edit actions should be undoable
  9. 9. How many actions should be undoable? • No sense in storing undo actions that will never be undone • User forgets about action eventually • Data must be deleted sometime
  10. 10. When should the undo data be deleted? • Never is (almost always) not an option • My pick: signing out • A user is not likely to want to recover data from a previous sign-in session
  11. 11. Implementing Undo
  12. 12. Database design • Make a table where old data can be stored and recovered through undo • Focus on the old data, date/time, and metadata about the undo
  13. 13. Backend design • Pair every delete/edit action with an undo action entry in the undo table • Get a copy of the old data into the undo table before deleting/editing • When a user undoes an action, use the old data for an insert or update
  14. 14. User chooses to delete data Data table Deleted data Undo table User realizes they deleted the wrong data Data table Deleted data Undo table The deletion is undone
  15. 15. Other considerations • Delete linked data when the undo action is deleted • Think about how data affects other data • Expose undo metadata through an API, not the old data
  16. 16. Demonstration
  17. 17. Thanks!
  18. 18. Questions?

×