14 September 2011

Frameworks vs libraries

Wow, this is the most friendly and concise description that I've ever read. In less than a minute it cleared up almost every point of confusion I had about web frameworks. Sourced from the Pyramid documentation:
A framework differs from a library in one very important way: library code is always called by code that you write, while a framework always calls code that you write. Using a set of libraries to create an application is usually easier than using a framework initially, because you can choose to cede control to library code you have not authored very selectively. But when you use a framework, you are required to cede a greater portion of control to code you have not authored: code that resides in the framework itself. You needn’t use a framework at all to create a web application using Python. A rich set of libraries already exists for the platform. In practice, however, using a framework to create an application is often more practical than rolling your own via a set of libraries if the framework provides a set of facilities that fits your application requirements.

No comments:

Post a Comment