[Zope3-dev] Re: Re: Zope 3 web root

Martin Aspeli optilude at gmx.net
Sat Feb 11 17:08:27 EST 2006

On Fri, 10 Feb 2006 23:49:55 -0000, Shane Hathaway <shane at hathawaymix.org>  

>>   So, I'm serving static content like Apache, I'm interpreting file  
>> types  like Apache and I'm using .htaccess files like Apache. But I'm  
>> using Zope.
>>  Why am I not just using Apache?
>> Would I be learning this beast that is Zope?
> The content is not necessarily static.  If you drop a .zpt file in the  
> directory, and some ZCML has mapped .zpt to PageTemplateFile, the result  
> is generated on the fly.  It's a rapid prototyping tool and a gentle  
> entry into the world of Zope.  You're using Zope because your friends  
> recommended it or it's because you already know it.  You believe that  
> the prototype can evolve fairly easily into a Python package, if you  
> later need it.

If you have friends who recommend Zope, you are probably already quite  
familiar with Zope ;-)

But ... if this is about offering an alternative for the  
content/run-time-configuration-space ZODB, why would you encourage putting  
ZPTs and Python scripts there? Isn't that a step back to the Zope 2 days,  
where content and logic got intermixed in the same database?

>>> Part 3: One kind of file we can put in the web root serves as a  
>>> gateway  into an object database.
>>  Or use RewriteRules?
> RewriteRules only work externally.  One possible use of a .zodb file is  
> to mount a catalog or an object store, which requires an internal  
> reference.
>> P.S. I would be more excited if there was a similarly integrated story  
>> for  RDBMS.
> Are you saying you want to put code and templates in an RDBMS, that you  
> want content to be stored in an RDBMS, or that you want to talk to an  
> RDBMS without putting SQL scripts in an OODBMS?

No, not at all. But I don't to put code or templates in the ZODB either, I  
want to put them in python modules. I would like the option of storing my  
content in an RDBMS more transparently, possibly via some ORM mapping like  
SQLAlchemy so that it's transparent to me as the python developer. I have  
no idea if it's technically feasible, but imagine how great it would be if  
deriving form Persistent and configuring that particular class via some  
ZCML directive as being RDMBS-stored with a given OR mapping (to map my  
fields to a particular datbase schema, much like Hibernate does in the  
Java world) simply made that class be stored in the RDBMS.

And I'd like to make it easier to talk to RDBMS' in Zope, although I think  
libraries like SQLOS or SQLAlchemy sound like nicer paths to that end as  
opposed to having Zope invent something of its own (not that I've used  
either, of course, I've only read a bit). Anyway, didn't mean to hijack  
your thread.

However, a similar story for on-filesystem content storage would be  
interesting, although that would require some sort of marshalling  
technology (storing python pickles in files is not that interesting, since  
it's still a black box). I suppose the WebDAV file representations of  
objects that exist today would work just as well on the filesystem, though.



More information about the Zope3-dev mailing list