re: What's the difference between a library and a framework? VIEW POST


A library is a set of invocable code. That's an easy one.

A framework is a set of rules, ideas and beliefs that is accepted as the basis for building upon. That's a general definition but it still applies here.

So an application framework has a set of rules, ideas and beliefs. If we can accept it, then we move on and build our application within the framework. This means the framework will then expect us to follow its rules (and API) to define our application Instance and our application code.

Otherwise, without an application framework, we are free to set things up however we feel like. Perhaps that will lead us back to our own past patterns, maybe not.

Over time, some patterns gained such wide acceptance that they became the features of popular new languages.
Eg. C++ derived classes from a particular module pattern in C.
Eg. MVC was a pattern in web programming before Ruby baked it in as language features

I moved on to patterns, but let's get back to frameworks. I'm sure there are many other types of frameworks, not just those that deal with the application.
Eg. CSS frameworks.
Eg. HTML component frameworks

I personally think frameworks are sensible. Why not stand in the shoulders of those who came before us?

Then again, whose to say the next big thing won't come from our best patterns that build upon those before us.

code of conduct - report abuse