[Seaside] Help needed for the Back button
Avi Bryant
avi at beta4.com
Thu Jun 3 09:19:23 CEST 2004
On Jun 2, 2004, at 11:41 PM, Michel Bany wrote:
> Then I had the idea to check how the Back button works for the store
> application. I discovered that it
> does not work right either, because, here too, the WAStoreCart is too
> complex. It holds the items in a Bag
> and would therefore need a deeper copy to completely preserve its
> state.
Actually, in this case there's no intention to have the state backtrack
at all. That would be a strange user experience - having put something
in your cart, to have it disappear because you used the back button.
In fact, the shopping cart is my usual example of state that
*shouldn't* be backtracked.
In general, it's pretty unusual to have complex state that wants to
backtrack - hanoi is a somewhat contrived example here.
> In my opinion, the code in restoreObject:fromSnapshot: should be moved
> to Object>>restoreFromSnapshot:
> so that everyone is able to re-implement a consistent pair of
> #shallowCopy/#restoreFromSnapshot: methods.
Yes, this makes sense, although I should use some more specific
selector than #shallowCopy (perhaps #snapshot will do).
Avi
More information about the Seaside
mailing list