Le 28 juil. 07 à 14:05, Matt S Trout a écrit :


I like more the idea of a generic undo request. This could be part of
a plugin providing this action and the necessary infrastructure to
implement the "un-doing" of the action.

I fail entirely to see why this should be a plugin rather than part of the
model you're intending to make mutations upon undoable.

Maybe it does not have to be a plugin. But it can't be exclusively in the model layer either, I guess? (I fail to see this one) The original idea was to provide a generic /undo action to perform the undo. The idea of tagging actions with a "Undoable" annotation was to register the action with the undo framework on the controller side, so that /undo knows where to forward the undo command.

The actual undoing could reside in the model.

This plugin could implement a simple version of the classic Memento
pattern (http://en.wikipedia.org/wiki/Memento_pattern)

I'd say DBIx-Class-Audit (currently in bast trunk pending more testing) already implements this pretty well for DBIC models - except it always saves the appropriate information, saving you needing to call anything at all to
make the undo happen.


Did not know of that, thanks for the info!

--
Matthieu Codron
[EMAIL PROTECTED]
_______________________________________________
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/

Reply via email to