Re: Undo/Redo in Web Application
Re: Undo/Redo in Web Application
- Subject: Re: Undo/Redo in Web Application
- From: "Jerry W. Walker" <email@hidden>
- Date: Tue, 2 Aug 2005 12:51:40 -0400
On Aug 1, 2005, at 11:44 AM, Jerome Chan wrote:
Is there a reason why Undo/Redo has not been done on most of the
Web Applications I've seen?
_______________________________________________
The primary reason is that the Undo/Redo concept originated in the
desktop app (and client/server) domains in which the programmer has
complete control over how the application will to ANY user action.
In such an environment, the user's actions can be tracked perfectly
and Undo can be implemented quite reliably.
In a web environment, however, the responses to user's actions are
only partially controlled by the web application. In particular, the
user can hit the back button or leave the web site at any time
without the app even being made aware of such an action. In
particular, the browser back button makes tracking the user's actions
unreliable at best.
The result is that very few WO developers use the Undo/Redo facility
except to call revert() on the editing context (which uses the
NSUndoManager to do the reverting).
I have, however, found it useful for transaction sequences such as
the following:
* user orders product through order screen, clicks check-out and
goes to credit card screen
* user enters credit card info, clicks confirm and goes to order
confirmation screen
* user confirms order totals, shipping, etc., clicks Purchase and
goes to purchase receipt screen.
In such a sequence, the user might have the credit card rejected and
need to go back to enter a different one. They might go back even
further to change their order. In such cases, Undo can be used in
conjunction with local editing contexts to keep the transaction
clean. However, it is used in this case as a programming tool and the
user is never made aware of the capability or given any explicit
control over it.
It is worth noting that if used in such a case, the default Undo
resolution is the request/response cycle, so if you do an undo, it
will undo everything done within the last R-R loop. This is a
significantly larger set of events, typically, than the events in a
Cocoa app, whose default resolution is the run-loop which can iterate
tens of times in a single swipe of the mouse across the screen.
Unless you're using Undo for such programming purposes, it is wise to
initialize your EOEditingContexts with setUndoManager(null) to avoid
the overhead of the unused Undo stack which has the potential of
growing quite large. Doing so, however, obviates the use of the revert
() method on the EC.
Regards,
Jerry
--
__ Jerry W. Walker, Partner
C o d e F a b, LLC - "High Performance Industrial Strength
Internet Enabled Systems"
email@hidden
212 465 8484 X-102 office
212 465 9178 fax
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden