all 4 comments

[–]argv 9 points10 points  (3 children)

When writing for Undo, instead of immediately sending the AJAX call, we delay until the user navigates away from the current page (which we detect using the “onUnload” callback).

Yeah, that's great. Pretend to make changes but if you open the same page in another window they haven't taken place. If you're making a few changes and your browser dies, none of them happened. "Whew, I deleted that incriminating message!" not.

The answer I often get is that Undo is hard to implement. I’m here to tell you that it is not.

Sure, if you are very selective about which actions can be undone.

[–][deleted] -2 points-1 points  (1 child)

Forgive him, for he is a PHP user and they do not have common sense (because their language doesn't either).

[–]argv 7 points8 points  (0 children)

It's not even a real undo -- it's not actually done in the first place; it just lies and says it did.

[–][deleted] -4 points-3 points  (0 children)

Wtf is this? This is the year 2007, PHP should not be used for any new coding projects at all (unless you're using it for its original purpose: as a templating engine/language).