[Catalyst-dev] [RFC] Template and Static directory locations

John Wang johncwang at gmail.com
Mon Oct 23 17:38:38 GMT 2006


I was recently going through the template directory structure and realized
that it's common for templates to be stored in MyApp/root/base which I think
is very unintuitive. The words 'root' and 'base' don't really mean anything
to someone who is unaware of existing conventions. The MyApp directory
itself can be considered the 'root' and 'base' directory for the app. In the
past ./root really meant template_root but some apps have started putting
static files in there as well.

I think it makes some sense to create a directory convention with more
meanining say:

MyApp/tmpl or MyApp/templates for templates

MyApp/htdocs or MyApp/public for static and other files

These directory names would make cat a lot more user friendly for new users
and have more intrinsic meaning.

I avoided MyApp/static because one advantage of having a ./htdocs or
./public directory is that you can put a .htaccess and index.fcgi in it and
then just point your web server to that directory. This would make it easier
to get some apps up and running.

For backward compatibility I was thinking we could have a backcompat plugin
that would be loaded by default. This way users can easily remove the
backcompat functionality if they don't need it.

I think this approach will simply make a lot more sense to new users. What
does everyone else think?

-- =

John Wang
http://www.dev411.com/blog/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jules.scsys.co.uk/pipermail/catalyst-dev/attachments/20061023/3=
8c13937/attachment.htm


More information about the Catalyst-dev mailing list