Monday, June 30, 2008

Me Grok Smash!

So as I started on yet another graphviz application for the web, I decided to go with a new framework. I would use Grok!

Grok comes out of the Zope community, and has its foundation in the rather mature components of that application server. The difference is that tying bits of Grok together does not rely on seemingly arcane xml files. You just code in Python and a bit of TAL for the views. If you want you can leverage in more bits from the Zope world, such as zope.formlib and other interesting bits.

It is a matter of public record that I have a like/hate relationship with zope.formlib.


There are some really nice things I discovered about Grok:
  • Intuitive.
  • Only one magic bit, in that class defined as views look for their lowercase template automatically, and you can override this if you like.
  • The framework is out of the way.
  • Inheriting models is a cinch.
  • Lets you play with either the ZODB or SQL ORMs.
  • Easy use of TAL.
Some negatives:
  • A possible gotcha when you instantiate an object inside another object requires you to do a super(MyObject, self).__init__() inside the object's __init__. Not sure why I should have to write this out and it might be I did something wrong.
  • Um... still trying to find faults.
I'm rather pleased. Grok has grown up lots since I really looked at it in late autumn of 2007. I look forward to working with it more.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.