Beautiful! For some reason searching for "delete", "deletable", or "soft" doesn't bring up that article. Thank you both for the link. I really like the look of it, and how it uses callbacks instead of adding new del() and find() functions.
I might end up modifying it to add a "prune"-style function instead of/ as well as purge() though. For some reason it feels much more user- friendly the way Gmail's "Bin" works, automatically emptying the oldest items. Compare that to the Windows recycle bin -- sure I can confidently move files into it, but the interruption of my workflow is simply deferred to the moment when I go to empty it, and wonder self- doubtingly if there's a chance I might need anything in there. But with the Gmail-style bin, I know that if I can go 30 days without missing something, it might as well be deleted permanently, so I shouldn't have to bother with it. P.S. Joel, I actually went and did php -r "echo round(pow(2,-5.643), 2);". I think you mean "round(pow(2,-5.643),2) DOLLARS". :) On Jun 12, 2:10 pm, Joel Perras <[EMAIL PROTECTED]> wrote: > On Jun 12, 1:19 pm, silverquick <[EMAIL PROTECTED]> wrote: > > > Hi all. I just read a really excellent article by Aza > > Raskin:http://www.alistapart.com/articles/neveruseawarningwhichrecommends, > > instead of those defacto "Are you sure you want to delete this?" > > warnings, just performing an undo-able deletion—or even better, moving > > the item to a "trash". This way the work flow is not interrupted, and > > there's no more just clicking "yes" out of habit, only to realise you > > made a horrible mistake. > > That's a wonderful article which brings to light many software design > principles & patterns that web application developers seem to omit. > > For what you are proposing, there is already a behaviour in the bakery > which follows the spirit of what you are trying to > accomplish:http://bakery.cakephp.org/articles/view/soft-delete-behavior (this > needs to be updated as of 1.2.0.7125 due to new query syntax, but is > nearly trivial; see the comments). > > The Soft Delete allows a user to 'remove' a record, but the > information is still retained in the database; this way, an accidental > delete operation may be reversed quite easily. Remember, however, > that there are several caveats to be considered when implementing this > type of functionality in web applications with a high level of > concurrency, whereby you can get yourself into several bizzare race > conditions and deletion/insertion anomalies when you are dealing with > 1:N and N:1 relationships whereby many users have the ability to edit/ > delete/restore the same records. > > Just my round(pow(2,-5.643),2) cents. > > -Joel. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
