transcript
- 1. Undo in a Web Application Chasen Le Hara BarCamp LA-4
November 4, 2007
- 2. The Problem Accidents happen Habits happen Data loss sucks
http://ickr.com/photos/wvs/141235163/
- 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. How should a user interact with undo?
- 5. The back button? Used for going to the previous page Back
button is for pages, not state Wont work (easily) with AJAX Not
readily apparent to the user
- 6. A proprietary interface Control over when the option appears
to users In line with existing instances of undo
- 7. Undos Scope
- 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. 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. 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. Implementing Undo
- 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. 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. 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. 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. Demonstration
- 17. Thanks!
- 18. Questions?