Library vs Framework definition?

Out of my feeling I think i know the difference of of library in comparison to a framework. But everytime I
search for a definition I am not satisfied. They use criterias which can be applied to both of them like:

  • reuseability
  • well formed interfaces
  • include components written for a special purpose
    {…}

Does anyone have a clear distinction?

I’d say a library is used ‘out of the box’, with maybe some config files. A framework is made for you to extend interfaces and classes when you use it. So a framework is to be ‘built on top of’, it doesn’t just work as is.

An example of a library would be LWJGL or JOGL.

A framework would be a database framework. The framework provides basic accessors to the database, bu to get that access you have to extend basic classes in the framework. Then in your own classes, you provide the more custom accesses, but pass those up through the framework.

also libraries are only classe/method/function

framework can include many tools as sprite editor, level editor , and many more

Libary is set of premade tools
A framework is a blue print which is our world as a dev useally aimed aimed at solving a specific problem(s).

a framework is a specification, a libary is functional.

And, just to be different, Id say the difference is conmtrol flow.

A library leaves the control flow to you.
A framework controls the flow of execution of your code.

And if you’re programming a Mac they are pretty much the same thing :slight_smile: Apple uses the term Framework for all sorts of “libraries”. The JavaVM for example is accessed in your code by including the “Java Framework” in a native application, which is basically a way for the header files to get included in the search path and the library files to get included for the linker.