From: Its Me Date: 2004-04-03T04:49:20+09:00 Subject: Re: Madeline - avoiding Command objects by 'Delegate'? Thanks! Is is nifty. What is the recommended way to deal with changes to schema / object structure? I recall seeing this discussed a long time ago on Prevalence but am interested in the Ruby best practice. "David Heinemeier Hansson" wrote in message news:1F2015C4-84CA-11D8-9D10-000A958E6254@loudthinking.com... > > Is it possible to avoid writing explicit Command objects by using (and > > extending) "delegate"? Could the delegator take care of command-object > > wrapping, so the callers still makes normal method calls? > > Have a look at madeleine/automatic.rb. It includes an interceptor > module that can be mixed into the service you're using Madeleine with > and all the methods are automatically turned into commands. Very nifty. > > Instiki uses this method. It goes one step further, though, and pulls > all the Madeleine goodies into one MadeleineService class that you can > inheirit from to have automatic snapshots setup automatically and > convenience methods for accessing the service as a singleton and for > clearing the database. > > You can get Instiki (with source of course) from > http://instiki.rubyforge.org. > -- > David Heinemeier Hansson, > http://www.basecamphq.com/ -- Web-based Project Management > http://www.loudthinking.com/ -- Broadcasting Brain > > >