[Catalyst] Splitting up a large application: Shared config and templates for multiple applications

fREW Schmidt frioux at gmail.com
Fri Aug 28 15:42:16 GMT 2009


On Fri, Aug 28, 2009 at 9:08 AM, Bill Moseley <moseley at hank.org> wrote:

>
>
> On Fri, Aug 28, 2009 at 6:41 AM, Matt Whipple <matt at mattwhipple.com>wrote:
>
>>
>>
>>> Anyone building applications out of multiple small Catalyst applications
>>> like this?  How do you set up the apps to share templates and a config?
>>>  Anything more interesting than passing in paths?
>>> One downside of this approach is we end up with a handful of very simil=
ar
>>> looking applications (same set of plugins, etc.), not to mention have t=
o be
>>> careful about how session data is shared, and so on.  I wounder if it w=
ould
>>> be difficulst to customize the catalyst.pl script to include a standard=
 set
>>> of plugins/roles that we use in every application -- e.g. have a skelet=
on
>>> app.
>>>
>>>  Subclass.  This could probably take care of sharing the template/config
>> resources also, but otherwise I'd probably lean towards symlinking over
>> modifying each app.
>
>
> Subclass what?
>
> I was thinking that I'd have to use an environment variable to point to t=
he
> location of the base application (the one with the base tempates and
> app-wide config) and then add to the template INCLUDE_PATH.  Or maybe have
> the applications look at $app_home/../$base_app/.
>
> Seems there was some discussion not too long ago of drop-in modules for
> application, similar to what many CMSs have.
>

Interestingly, I think the Rails guys (or was it Merb?) made something
kindav like this.  Basically they made it so that you can drop a Rails app
into an existing Rails app and things "just work."  I don't know enough
about Rails to say how well it works and whatnot, and I know that because
Catalyst is much more flexible it is unlikely that we could do anything to
make it as convenient, but maybe we could look into something like this?

I know Chained actions and our lack of a single location of routes
ameliorates this enough that this is probably something not a lot of Cat
teams would use.  Anyway, just some thoughts in relation to this stuff...

-- =

fREW Schmidt
http://blog.afoolishmanifesto.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20090828/23166=
6f4/attachment.htm


More information about the Catalyst mailing list