[Zope] Naming conventions

Ian Bicking ianb at colorstudy.com
Mon Dec 1 15:59:25 EST 2003


On Dec 1, 2003, at 1:10 PM, Gabriel Genellina wrote:
> I prefer to strip file extensions, they are tied to a specific format 
> which is an implementation detail. I need a resource named 'logo' - if 
> it's a jpeg, a gif or svg should be irrelevant, and a *real* webserver 
> should decide which is the best one to return (if there were a 
> choice).

In reality, though, you'll usually need to have some notion of what 
kind of object it is.  You'll want to know the dimensions, if it's not 
an image you have to use different tags, etc.  Zope can do some of this 
for you (e.g., creating the IMG tag), but that won't take you very far 
-- you're likely to need extra access, like CSS, Javascript events, 
etc., and even if Zope could handle these in a uniform way, it's 
unlikely that browsers will do the same.  The page and its embedded 
resources are tightly coupled (and I don't think that's really so bad, 
either).

In the end it doesn't matter, because images and other resources aren't 
generally public URLs.  They are specifically referenced and embedded 
from other pages, and few users view the image URL (and almost no one 
needs a long-term stable URL for embedded resources like images).

--
Ian Bicking | ianb at colorstudy.com | http://blog.ianbicking.org




More information about the Zope mailing list