[Catalyst-dev] Extensible Catalyst Applications: How?!

Peter Karman peter at peknet.com
Tue Jun 2 17:51:07 GMT 2009


Kee Hinckley wrote on 6/2/09 12:25 PM:
> Interesting. Oddly I'm trying to find out how to do the same type of
> thing in Rails right now, and in doing so I realized I didn't know how
> to do it properly in Catalyst either.
> 
> The need seems to be pretty general as people move forward with
> deploying applications rather than one-off web sites. You want a core
> application that has various modules. You want to give this to someone
> in a way that it works out of the box, but they can:
>     1. Add new modules (which includes new database tables)
>     2. Subclass existing modules (e.g. add new field to a form/database,
> override the functionality of a particular method)
>     3. Reuse modules (e.g. deploy multiple, slightly different, polls
> within a site)
> 
> The database issue is particularly problematic. Catalyst/DBI doesn't
> provide good automatic migration tools. Rails does, but assumes it's all
> one big application. In the model above, modules would want to migrate
> their tables somewhat independently. Practically speaking though, it's
> impossible to 100% solve that problem with anything automatic.
> 

DBIx::Class deploy() method seems to work well. I wish RDBO had it (/me already
has it on todo list).

> The subclassing is particularly important to me because I want to keep
> the core modules as pristine as possible. New versions of the
> application should be modified in separate class files. This is because
> we need to maintain multiple copies of the application (different
> variations for different clients). We need to merge bug fixes between
> the versions, but don't want to pick up application-specific changes.
> Anything we can do to keep the changes in separate files is going to
> make life significantly easier. The same issues apply if you have a core
> application that people are using on remote installations. You want to
> be able to send them updates without stepping on their changes.
> 
> Any thoughts on how to structure this in Catalyst?

CatalystX::CRUD::YUI does all that. At my last job I had 6 different apps
running with it, 4 of them on one machine. cpan -i CatalystX::CRUD::YUI and an
app restart was all it took to update them all.

-- 
Peter Karman  .  http://peknet.com/  .  peter at peknet.com



More information about the Catalyst-dev mailing list