[Zope] Naming conventions

Ian Bicking ianb at colorstudy.com
Tue Nov 25 15:14:30 EST 2003


On Nov 25, 2003, at 9:00 AM, Florian Lindner wrote:
> Hello,
> which naming conventions are usual for Zope objects?
> For example:
> pyThatScript
> ptPageTemplate OR
> zptPageTemplate

I wouldn't use any naming convention involving resource type for 
URL-accessible objects.  I usually follow the convention that each 
"screen" has a Python script (with no particular naming convention), 
and a Page Template that goes with it (by the same name, but with a .pt 
extension).  I've been naming Z SQL methods sql_*, to match the name of 
the Python Script that uses them (and I use the Z SQL method directly, 
except through that Python Script) -- and then I put them all in a sql/ 
folder just for the heck of it.  I find it important that objects not 
share a name, even if they are in different folders -- it can cause 
lots of confusion when acquisition acts differently than you expect and 
you get a different object than you wanted (I'd rather get a NotFound).

I'm not entirely happy with this application layout, but it's better 
than a totally ad hoc layout, IMHO.

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




More information about the Zope mailing list