What Django could learn from Zope
In my talk at PyCon, I talked about the mistakes Zope did and what other web frameworks could learn from these mistakes, and how to avoid them. Since I didn’t want to point fingers on who had learned these lessons and who hadn’t I didn’t say anything during the talk, even if I mentioned it in passing in a later blog post. The TurboGears people have the same insights and have learnt these lessons and Django hasn’t learned the lessons, and are in a risk of redoing the same mistakes (and to some extent in fact are redoing some of them already).
And now, Mark Ramm of TurboGears fame has done a DjangoCon Talk where he talks about some of the mistakes that Django does that Zope already have done. He mentions that it’s monolithic, and somewhat isolated from the rest of the python world. Not as badly as Zope, but still.
He misses one mistake: They use magic. There are heavily magical MetaClasses stuff in Django. Maybe not so heavily magic as Zope 2s magic, but still. They also enable dynamic permissions by having special little methods on the models, which is unflexible and makes for “dirty namespaces”. That’s OK for a couple of methods, but as the project grows, it’s going to be more and more methods. This is a nightmare in Zope2, especially if you use Plone, where it’s a multiple nightmare. If Django continues on this path, it’s gonna be a problem for them as well in some years.
Watch the talk, it’s very enlightening, even if you don’t are a Django-developer. The lessons are important for most big projects. And let’s hope Django people listen to Mark Ramm, cause I didn’t see them at my talk, so they probably didn’t listen to me.🙂