Zope as a framework
Or at least the way I use it
Zope
Posted at Mar 20 2010 13:31  Comments 0 / Trackbacks 0

I always have doubts about if I am using the "right" language and framework and while I'll never be completely sure it does make sense some times. Chris McDonough the creator of BFG:Repoze is talking about when it's appropriate to create a new framework. I'm not anywhere close to that kind of stuff but Casey Duncan adds some comments referring to Zope 2 (the application that became a framework) and the Zope Toolkit ( meta-framwork ). Casey's descriptions are very close to my experience of these projects.

A few paragraphs from Casey's comment.

One would be the application that becomes a framework. This would of course be our old friend Zope2. Since frameworks are almost applications, it seems like this should not be too problematic. Technologically it probably isn't, you could just pull out some of the hardwired application policies and features and somehow make them pluggable. But the practice of developing an application is often done with a different mindset on reuse, and whatever apis exist are designed only with the convenience of the application in mind. Often expediency is the order of the day, because folks largely don't care how horribly factored an application is underneath, so long as the paint on the outside is nice and glossy. So the focus is on an end-user that is different from the end-user of a framework, and thus making it into a framework after the fact leads to a big impedance-mismatch. OTOH, application do have one very strong benefit, they do something useful already. So using an application-turned-framework to build an application that is largely similar to the original one should be a cake-walk.

Another framework pitfall is the meta-framework. I think we all know which one I mean ;^). This is the polar opposite of the application-turned-framework. This framework has never been an application, and cares little about such things. It is a jig for building tools, a hammer factory, or maybe even a tool for building a tool factory, or maybe...nobody knows. The cool thing about the meta-framework though is that smart people, with an unnatural grasp of the abstract, can build their own frameworks out of it, and those frameworks might even have a discernible goal. And maybe those frameworks can be leveraged by normal human-brained application developers, even.


Comments
Trackbacks