>From a glance I see only 2 code flaws:
"private" declarations shouldnt be used inside a framework without
very good reason to do so (use "protected" instead)
->Save should probably be ->save

and it would probably be a good idea to make a test case for it.
especially since revisions and everything related to it is an
important task :)
and you or others might want to enhance the code some day.
without the regression tests that will be difficult to accomplish.

PS: what didnt you like about the existing behavior?
http://code.google.com/p/alkemann/downloads/list
seems like it is already quite sophisticated (although slightly
outdated, maybe - 2009).
it seems to have solved the diff part, as well.

cheers
mark


On 6 Dez., 08:08, Jeremy Burns | Class Outfit
<jeremybu...@classoutfit.com> wrote:
> I like the principle, but how does it work in practice? A few questions:
>
> - I haven't looked at the code, but my guess is that you are storing an array?
> - You also mention that it stores related data. So does this mean that if a 
> table can be updated from two places - one with a save and the other with a 
> saveAll - that the array it stores in each case is different?
> - How do you get the data back out and into the database - or is the purpose 
> something other than rolling back?
> - How do you parse the rows to get an understanding of what's happened?
> - How do you find the revision you are looking for (say something changed 
> about a week ago and you want to find out what happened and who did it?).
> - If you apply this to lots of tables it's going to become huge, isn't it?
>
> Jeremy Burns
> Class Outfit
>
> http://www.classoutfit.com
>
> On 6 Dec 2011, at 06:5632, anagrithems wrote:
>
>
>
>
>
>
>
> > Not sure if anyone else has been looking for this like me, but I
> > created an easy to use simple versionable behavior for cakephp 1.3  it
> > hooks into the beforeSave callback and grabs a copy of the data before
> > it changes and stores it in a revsions table.  The great thing about
> > this plugin is that you don't need to make a different shadow table
> > for each model.  All models can be placed into the same table.
>
> > I've thrown together a quick article on it in the bakery
> >http://bakery.cakephp.org/articles/analogrithems/2011/12/06/simple_re...
>
> > Code is available athttps://github.com/analogrithems/revisionable
>
> > The install is super simple two steps
> > 1) First you need to add the table to your project use the following
> > to generate that
> > cake schema create Revisionable.revision
>
> > 2) add the behavior to your model like so
>
> > var $actAs = array('Revisionable.Revisionable');
>
> > I'd love feedback on this if anyone sees fit.
>
> > --
> > Our newest site for the community: CakePHP Video 
> > Tutorialshttp://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help 
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to