[Catalyst-dev] Extensible Catalyst Applications: How?!
nazgul at somewhere.com
Tue Jun 2 17:25:56 GMT 2009
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
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?
More information about the Catalyst-dev