September 25, 2005

Undo in web apps

Filed under: MagnaCRM, Web development — Dimitris Giannitsaros @ 21:27

Undo in web applications is not very popular. Actually, I have used no web app that had extensive undo capabilities. I was reading about this recently somewhere and started thinking if I could make an undo feature for MagnaCRM and how I would go about implementing it. I certainly don’t intend to do it for v1.0 as I already have a full plate.

I think the most difficult operation to undo is a delete, because deleting a record may require deletion of dependant records (e.g. delete an account and you also delete all related contacts). Moreover, instead of deleting from the database you must only flag affected records as deleted. The good thing is that I can offer undo for delete operations easily, since I already have a Recycle Bin feature (deleted records go there and you can undelete them at any time).

Edits seem easier to undo although they could prove to be trickier. You need some kind of auditing mechanism that logs all changes done to records by each user. Then you use that to go back to previous states and you could even offer a redo.

The question that I needed to answer is: should I offer an undo feature that will only undo delete operations or leave it all for next version? I’ll probably do the later, as it will be rather confusing to have an undo button after deleting a record but not after editing it! For v1.0 the Recycle Bin will have to suffice: you can still undelete something even if no convenient undo button is offered.

3 Comments

  1. Undo on desktop apps is easier because you’re only dealing with the actions of 1 user. Web apps, a whole lot more complex.

    It would be pretty cool to have an undo, but you may want to wait until version 1.1.

    Comment by Michael Sica — September 27, 2005 @ 03:05

  2. Even in desktop apps you are not always dealing with one user. Although I agree undo is usually implemented in single user programs…

    Comment by Dimitris Giannitsaros — September 27, 2005 @ 18:17

  3. The real problem (IMHO) is that HTTP is session-less. When we talk about UNDO we ususally mean session-based undo.

    On the other hand, you could use cookie-based sessions and SQL-based transactions to implement undo in web-based apps. Or, maybe not, I’m not sure :-)

    Comment by Panayotis Vryonis — October 1, 2005 @ 16:56

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.


Powered by WordPress Theme by H P Nadig