All Roads Lead to Zope3

It seems I have come almost full circle in my search for a new web application server framework. While attempting to find an alternative to Zope2, and Zope3, I stumbled across Grok by way of Pylons. I’ll explain.

Spot the Difference

TurboGears, which I gave my impressions of in my last post, is being rebuilt on top of Pylons in TurboGears 2.0. I started to look at Pylons because in playing with TurboGears, I realised that it was moving to use almost everything that Pylons uses. They were moving to SQLAlchemy from SQLObject as the default ORM, which is what Pylons uses. They were moving to Genshi as the default templating language, just like Pylons. You can use Routes to define the URI->controller/action mappings, which Pylons uses. The only real difference appeared to be Pylons’ use of Paste as the webserver, vs. TurboGears’ CherryPy.

A Snag

However, TurboGears 2.0 is a fair way off from release, and it looks like it still won’t do what I want. The major flaw with TurboGears, IMHO, is that it doesn’t let you combine multiple applications in the one server, making the combination of a Identity provider module with a Blog module and a Threaded Comments module quite a challenge. So I looked more closely at Pylons, since they seemed to be morphing into one another, and alas, Pylons is also quite immature. Both frameworks are only about a year old, so they are lacking features. Worse, Pylons doesn’t appear to have the same community built around it, so it doesn’t have even the scant applications that TurboGears does in their CogBin.

With either framework, I was looking at a lot of custom development to get the components I was lacking in Zope2, and losing a lot of the ones I already have in the process. Lose/Lose. Not good.

Back to the Drawing Board

So, the words of Marvin the Martian, “Oh well, back to the old drawing board.” I needed to cast around for another possibility. Maybe I’d have to venture into Django land, or worse, into something with, erk, PHP. Somehow, I stumbled across Grok, and I am quietly hopeful.

Zope3, Only Usable

Grok appears to be an effort to build a rapid development web application framework on top of Zope3. It builds on the powerful and extensible, yet complex and unwieldy, Zope 3 by layering some useful shortcuts on top. You get the benefit of all the power of Zope3 under the hood, but the agility of a modern web app framework. It looks like you can do most of your development in the world of Grok, but you could drop down into ubergeek Zope3 mode if you need to do something more complex.

The best bit would be that you could also use a lot of the components that already exist for Zope3, and with some modifications, Zope2. Zope has a lot of heritage (not all of it good, hence Zope3) that means you don’t have to reinvent a bunch of stuff. Zope3 is also based on the Twisted async engine, which is several flavours of awesome. Twisted also has a steep learning curve, as does Zope, but I’ve already climbed a lot of the way, so I can get a lot done in both of them. Perhaps I’ve been a bit hard on ol’ Zope?

Learn More

In learning more about Grok and Zope3, it appears that all is not as bad as I had feared. Grok makes it easy to get going with Zope3. It lets you use Python eggs, which are awesome. You can plug in different templating languages, so I don’t have to suffer with ZPT all the time if I don’t want to. Grok has a scheduler built in. Grok seems to place a lot of emphasis on components and reuse, which is part of the strength of Zope3. Zope3 has nabbed the schemas concept from Archetypes, so web forms are still easy, and the set of Widgets available has gotten better. You can do ORM if you want to, but you can also just use the ZODB, which is actually really awesome now that I’ve done a bit of ORM based webapp development. Grok has a bunch of example code. Zope3 has a strong emphasis on automated testing, as does Twisted.

So it appears we have a new leader in the “Who will replace Zope2 as the eigenmagic preferred web framework?” stakes. Now I just need to Grok it.

 

Bookmark the permalink.

Comments are closed.