[Zope3-dev] Zope 3 without ZODB
Jim Fulton
jim at zope.com
Sun Jan 21 10:48:01 EST 2007
On Jan 20, 2007, at 3:07 PM, Chris Withers wrote:
> Jim Fulton wrote:
>>> ...mean that Zope 3 is currently hard-coded to need a ZODB?
>> That depends on what you mean by Zope 3. If you define "Zope 3"
>> as zope.app.server.main, or zope.app.twisted.main, then yes, it
>> is. I wouldn't define it that way, although I can see how others
>> might. :)
>
> Well, for me, a Zope 3 instance is what you get when you run
> mkzopeinstance. If there's other alternatives to that, I'd be
> interested in exploring them :-)
I think mkzopeinstance if fine, as far as it goes. I don't plan to
use it in the future, even for setting up the existing main programs,
which generally do meet my needs. (I have no interest in running Zope
w/o ZODB myself.)
>>> If so, how should we go about making this optional?
>> You would need to write a different main program that did
>> something else.
>
> Has anyone else attempted this?
As I have said over and over. Yes.
> Does grok have one of these?
I suspect so,.
>
>> You would need to understand how the publisher framework worked
>> and plug in an alternate publication that traversed to non-ZODB
>> objects.
>
> I touched on this with my reply to Philip, but surely the
> publication type should just be operating on objects that implement
> an interface?
> It seems odd, at least to me, that I'd need to rewrite publications
> that know about things like http, ftp and webdav just because the
> object I want to publish come from a file system or relational
> database rather than a zodb...
The publisher knows nothing about the application. The publication
object is the object responsible for providing this integration. It
is not a very complicated interface to implement. Depending on your
needs, you can likely subclass the existing piblication if you wish.
...
>>> (I am willing to put the work in to make this happen if people
>>> give me some hints...)
>> Other people have already made this happen. I don't know if any of
>> their code is public or if they have written up what they've done.
>
> This is a bit cryptic... are you saying there is an "alternative
> zope 3" that already has alternatives to zope.app.server.main or
> zope.app.twisted.main? If so, where are they to be found?
Alan Runyan and Sidnei Da Silva created one of the earliest Zope 3
applications using SQL Objects. I don't remember the name of their
application or what it's status is. Maybe they'll chime in or you
can ask them. Launchpad is a Zope 3 application that doesn't use
ZODB. I don't think that code is available.
I'll note, and this will be, hopefully, the last comment on this
thread, that a Zope 3 application based on relational databases is
likely to look a lot different than a traditional Zope application.
In particular, I wouldn't expect such an application to use an object
filing system model, which is difficult to achieve with an RDBMS. I
expect that such an application would simply expose pages in some URL
space that isn't derived from data structures and that these pages
would simply call into databases as necessary. I expect that such an
application would look a lot like applications built with other web
frameworks.
Jim
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the Zope3-dev
mailing list