Library vs Framework (was Dr. Dobb's Python-URL!)

Magnus Lycka lycka at carmen.se
Tue Aug 16 13:08:50 EDT 2005


Terry Hancock wrote:
> Zope recently started going through some massive changes to make
> it more like a toolkit (which is the term I use instead of library here).
> Even if there must be a framework, a thin framework with good tools
> tends to be better than a complex framework, even if they can, in
> principle do the same job.

I think the Python community would benefit a lot if more of the
Zope code becomes usable independently from Zope, and I hope it
can influence not only the core Zope components, but also how
people who code for Zope write their code.

I've used ZODB successfully without Zope, and now I've started to
use Twisted, and thus Zope Interfaces. Once upon a time I used bobo
a little for things where Zope would be overkill. Zope contains a
lot of code written by very smart Python developers, and I'm sure
there are more gems to pick.

Concerning 3rd party software, there does for instance seem to be a
number of Zope workflow engines, but I don't know of any capable open
source workflow engines in the non-Zope Python world. Things like that
would be useful.

None of this contradicts that frameworks can be useful and productive
tools, but I think that just as with GUI tool kits, it's good practice
to write your main business logic in a generic and toolkit independent
way, and to use a thin layer of toolkit or framework etc to make things
work in just that context.

Just avoiding existing frameworks isn't the solution--you'll just end up
inventing your own framework instead.



More information about the Python-list mailing list