[Grok-dev] Developer scenario
jdnier at tds.net
Wed May 16 10:58:15 EDT 2007
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.
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!
More information about the Grok-dev