[Grok-dev] Developer scenario
David Niergarth
jdnier at tds.net
Wed May 16 10:58:15 EDT 2007
Hi,
I'm a Zope 2 developer considering a move to grok or Zope 3. Our application is not typical, it seems, and I'm wondering if anyone on this list would comment on whether the scenario I describe below seems like a reasonable migration candidate for grok.
====
Our application is currently in Zope 2.7. All of our content is kept in Postgres. We're really only using the ZODB to organize our code. The code objects are limited to Page Templates, Python Scripts, ZSQL Methods, JavaScript, and Folders. We have one Zope Product, which our Python Scripts (in Zope) use to access Python library code (outside Zope) that communicates with Postgres. The ZSQL methods in Zope are used mostly by Page Templates for populating list boxes, etc.; anything heavy (searching, sorting, updating) is run through the library code (via the Zope Product). We have no other content in the ZODB.
A typical folder within the Zope 2 ZMI for our app will contain a Page Template, several supporting Python Scripts and ZSQL methods, and one or more subfolders, which in turn contain Page Templates, Python Scripts, and more subfolders.
====
So given that structure, is grok appropriate? Is it overkill? Is it more focused on managing content objects in the ZODB?
I've started by dumping a site to the file system with FSDump. From the grok tutorial, it looks like our Python scripts would become methods on the relevant Model or View class. Our library code could be accessed directly. But, ...
* For our current nested structure (folders within folders), could the subfolders become submodules or would we need to flatten things out? Our Python Scripts rely on acquisition to locate other scripts and ZSQL Methods (e.g., context.another_script_in_same_folder(); context.tools.some_shared_script(), where tools is a folder one or more levels up). Would nested submodules allow most of the calls in Scripts to stay the same?
* Is there a way to handle ZSQL? (I've not been able to find any examples.)
* Is the psycopg2 database adapter accessible from within grok?
Hopefully these questions will be relevant for other Zope 2 developers who haven't yet moved to Zope 3 (but who "think like caveman, like grok big club"). Thanks for any guidance!
David Niergarth
More information about the Grok-dev
mailing list