[Catalyst] A different approach to static content

Christopher H. Laco claco at chrislaco.com
Tue Aug 16 20:59:33 CEST 2005


Andy Grundman wrote:
> Christopher H. Laco wrote:
> 
>> I guess that's what bugs me. Today it's /static, tomorrow it's 
>> /images, and next week it's /downloads and maybe it needs to be under 
>> / and not /myapp.
> 
> 
> I don't think it's too much to ask that your content guys be forced to 
> keep everything under a /static directory.  This keeps your Apache 
> config very simple.

No, it's not to much to ask if you're writing a site from scratch. But 
situations get unlike textbook examples quickly. If I'm foisting a 
Catalyst app into an existing site with hundreds of megs or even gigs of 
static content, I'm not sure my boss, marketing, or the web design team 
would accept spending time/money moving every piece of existing static 
content into /static and changing all of the urls.

Sure, most of it may be cured with various httpd.conf and mod_rewrite 
encantations. But it can be done better with NO encantations.

I'm trying to achieve a utopia where the catalyst things go to catalyst 
and the rest just gets served [without going through catalyst] without 
doing anything more than:

	PerlModule MyCatalystApp

Again, I don't think anyone is right or wrong here. I just think there 
has to be a better way.

If I want to serve static mycrap.somenewextension files it should just 
work without having to tell  the static plugin its a static file or 
hoping that the mime-types check thinks it's a static file. Past 
installing Apache, serving static content shouldn't involve any extra 
work on the part of the user, or the content creators.

If I want to serve / and /cart from Catalyst and /feedback.htm as a 
static file, it should just work. I shouldn't have to even load the 
Static plugin, or even tweak httpd.conf to exempt .htm from the / 
set-handler used to load the Catalyst app.

I know I'm being a pain the a**, and there are other ways to do it.
I just think it could be even easier.

-=Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3178 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20050816/ed0a9d59/smime.bin


More information about the Catalyst mailing list