[Grok-dev] Re: Grok w/o ZODB

Michael Haubenwallner michael at d2m.at
Mon Apr 14 08:04:50 EDT 2008


Philipp von Weitershausen schrieb:
> Michael Haubenwallner wrote:
>> Hi, i've just posted about my package that lets you run Grok without 
>> the ZODB dependency.
>>
>>   http://blog.d2m.at/2008/04/13/grok-without-zodb-wsgi-based/
>>
>> I'd appreciate your feedback.
> 
> I couldn't find a way to comment on your blog, so here's my feedback:
> 
> * Currently you have a hard-coded root object that you import. It would 
> be much nicer to make it pluggable as a utility, e.g.
> 
>   getUtility(IRootObject)
> 
> That way you'd have pluggable root storages instantly (a ZODB backend 
> could register its root object as a utility upon opening the database, 
> an SQLAlchemy backend could do the same based on user input, etc.)
> 
> * Why did you copy'n'paste zope.app.wsgi into your wsgi.py? I see no 
> apparent reason for this (but maybe I'm blind). Also, I suggest turning 
> over to zope.publisher.paste for the application factory, rather than 
> zope.app.wsgi.
> 
> * I'm a bit scared by the in-line registrations in appsetup.py. If this 
> is meant to be a pure-Zope3 package, they should be in ZCML. If it's for 
> Grok, please use Grok directives. Either way, just doing them upon 
> import will unleash wicked side-effects and basically makes your code 
> untestable.

Thank you for your feedback. The pluggable root object is a great idea. 
I'm now looking into how to integrate your other suggestions. Maybe 
people at the grok sprint will take this even further.

Michael

-- 
http://www.zope.org/Members/d2m
http:/planetzope.org



More information about the Grok-dev mailing list