Where did undo go?
-
by Allan Ebdrup (November 2008)
In the 1980s a major selling point for Microsoft products was the full implementation
of undo's and redo's of all your actions when editing documents. Undo has been an
inseparable part of good desktop applications ever since. Now here in 2008 I’m using
all my AJAX and web 2.0 applications and I find myself wondering: ”Where did undo
go?”. Granted there is a little undo in major applications like Flicr, Goggle docs,
Gmail and others, but it could be better. When I delete a picture on facebook why
can't I undo it? The only way to get it back is to upload the picture again. Oops
where did all the comments go? Or, oops I don't have the picture anymore. Furthermore
we all need to think about undo, not just the big players even the smaller websites.
Video of how undo should work (45 sec)
Why have undo?
The reasons for having an undo feature seems obvious. Studies have shown that around
70% of all human errors are immediately self-detected. Humans like to discover things
through trial and error. Whenever a human uses a computer errors are inevitable.
So we need undo.
Undo and developers
I think undo seems like a giant monster to most developers; it looks like a beast
that will be hard to implement. And no programming framework I know of for the web,
has any kind of native support for adding undo. As a developer you´re on your own,
you have to implement it all yourself. Hey dotNet, Java and Ruby! We need native
support for undo!
Undo and the web
The reason undo has disappeared is because of the way most web 2.0 applications
work. Every time the user makes a change, we persist it immediately. We save it
in the database on the server. This is a good practice; we don’t want our user’s
changes to get lost if their browser crashes. We want to keep our users data safe.
Implementing undo in this kind of client/server application means we’ll have to
implement undo's all the way to the server and the database. That seems hard.
And what about user concurrency? The stuff we want to undo might have been added
as a foreign key to something else by another user.
So what do we do? Maybe we ask ”Are you sure you want to delete?” and by doing so
break a very old usability rule. We’ve all done it, but it’s not the best idea.
We need undo.
Native support for undo in our development frameworks
Undo is not like a transaction in a database. Undo is special. When you perform
an action that you might want to undo later, you will want to commit it right away. We
don't want the database to have a lot of open transactions that are waiting for
a user to click save or commit. And we do not want to have to worry about cleaning
up, if the users browser crashes. Also we want support for undoing, redoing, undoing
and so on. I would like this support for undo to be build into the development framework,
so you only have to add a few lines of code to your application to get undo functinality.
I'm positive this can be done in a generic and reusable way for 90% of all actions
in web applications.
So how do we get undo back now?
In some web applications I think it’s a good idea to mimic the behavior of desktop
applications when it comes to undo. In my application
obsurvey, a free web application for creating online surveys, I’ve implemented
a full unlimited undo history for any change to the survey the user is editing (see
video above). It took only 3 days to implement undo. Anyone can do it if you have
a really thick client, a RIA. Of course if the browser crashes, the user looses
his/her work, but that can be remedied with the well know auto save feature.
For not so thick web applications we need to think hard on how to implement undo.
We need some best practices, and a good metaphor like the shopping cart of undo.
There is always the thrashcan known from operating systems for files, but does that
really transfer well to the web? In some cases I think it might. Another idea is
to use the back-button on the browser, in the facebook example of deleting a picture,
simply clicking back in the browser could undo the deletion.
What is certain is that we need something that’s easy to understand for the user
and easy to implement for the developers. So please dear developers, share your
good ideas about undo. We need it back.
In the future we need development environments like dotNet, Java, Ruby, Silverlight,
Flex and jQuery to natively support undo patterns, and if I think really big I would
say we need native support for undo in our databases. Hey, you can always wish!
Other articles about undo
There are some other articles about undo out there, Gabriel Svennenberg has written
an article called No undo?
Redo!. Aza Raskin wrote an article
Never use a warning when you mean undo and two blog posts
Undo made easy with AJAX part 1 and
Part 2. Paul Boag wrote an article called
The importance of undo.
Other articles by me
More about the principles I use in obsurvey: Structured Active Rich Document (SARD)
More about my JavaScript framework Usablility is In the Application (UIA)