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

Matt Whipple matt at mattwhipple.com
Fri Aug 28 13:41:35 GMT 2009


Bill Moseley wrote:
> I'm exploring the idea of breaking up a large application into a 
> number of separate Catalyst apps.  The application currently exists of 
> a base application and a number of optional "products." For example, 
> one product might be to add a calendar and scheduling to the application.
>
> The base application has layout templates that all "products" need to 
> use.  So each app would need to share a template path.  Also, each 
> product would need access to application-wide configuration.
>
> The reason I'm looking at this approach is so that different teams of 
> developers can work on the products, test products separately, and 
> release the products on different schedules.
>
> 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 
> similar looking applications (same set of plugins, etc.), not to 
> mention have to be careful about how session data is shared, and so 
> on.  I wounder if it would 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 skeleton 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.

>
>
> Oh, just noticed:
>
> $ cat MyApp/myapp.conf
> # rename this file to MyApp.yml and put a ':' in front of 'name' if
> # you want to use YAML like in old versions of Catalyst
> name MyApp
>
> ConfigLoader looks for lower case file names, right?  That is, 
> shouldn't that be "myapp.yml"?
>
>
>
> -- 
> Bill Moseley
> moseley at hank.org <mailto:moseley at hank.org>
> ------------------------------------------------------------------------
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>   




More information about the Catalyst mailing list