[Petal] best practices question(s)

Corey corey_s at qwest.net
Fri Jun 23 21:21:48 BST 2006


Yo!

Say I have a fairly involved cgi app, called "foobar", and
an apache document root such as the following:

/var/www/localhost/:
cgi-bin/  error/  htdocs/  icons/

/var/www/localhost/cgi-bin/foobar/:
FooBar/ FooBar.pm foobar.pl


My questions are:

Where "best" to put the pe(tal) templates -- under the
cgi-bin or under the htdocs? i.e:

* /var/www/localhost/cgi-bin/foobar/
OR
* /var/www/localhost/htdocs/foobar/

I guess because pe(tal) _is_ x/html, it really falls in a
tough spot as to where best to logicaly organize it. Perhaps
this is very much a purely subjective matter; so I'm just then
looking for other peoples' opinions and practices, to help 
sway me one way or the other.

Also, how about images that the templates use? In my
mind images don't belong anywhere under the cgi-bin -
where do you guys put your image files?

As a final question - do you put your petal "view"/"controler"/"helper"
modules ( i.e. my "FooBar.pm" ) in along with the cgi scripts
themselves under cgi-bin, or do you put those somewhere else 
on the system?

I appreciate the info, I'm very interested in what other folks are
doing.  ( I'll be moving from a simple cgi-scripts-with-modules 
methodology to porting all this to a more pure MVC approach
using catalyst in a few months, but the app hasn't quite grown
to the point where it really warrants that move just yet )


Thanks!

Corey






More information about the Petal mailing list