I have been programming professionally for a couple of decades. Some years ago, the framework word was not so widely used as it is today, but I still believe we've been using "frameworks" for a very long time before they were called that.

For example, the Java SDK has parts that can be considered frameworks; like for example the Collections framework. Also J2EE gives some structure, classes, interfaces and directives for building web solutions. Isn't that a framework? Well, Wikipedia calls it a platform.

Usually throughout the years, one builds up a plethora of interfaces and classes that conform a common practice allowing you to build apps in less time than before by leveraging your previous achievements. Isn't that body of structures, steps, analysis and design products (interfaces to implement and abstract classes to extend) a framework?

  • Is there a canonical, and quotable, hard line separating what a framework is and what a comprehensive set of APIs or a SDK is?
  • When was the term framework introduced in computer science?

Note: this other question is about API vs SDK, so it's not a duplicate.

Wikipedia only says this:

"An architecture framework establishes a common practice for creating, interpreting, analyzing and using architecture descriptions within a particular domain of application or stakeholder community.

  • 1
    Possible duplicate of Library vs. framework vs API? – Scant Roger Jan 9 '16 at 5:06
  • @ScantRoger Possibly, but that question has a historical lock, i.e. it would've been deleted if not for the view count, so I'd avoid using it as a dupe target. If this question should be closed at all, I'd prefer we used "too broad" or "primarily opinion-based" rather than "duplicate". – Ixrec Jan 9 '16 at 12:56

The definition of a Framework has evolved. When Sun released the Java collections framework, it was just a fancy way of saying "library". Today, a framework means more than that. It's code that hosts your code. It calls your code versus your code calling it. (The Hollywood Principle)

From Martin Fowler:

"Inversion of Control is a key part of what makes a framework different to a library. A library is essentially a set of functions that you can call, these days usually organized into classes. Each call does some work and returns control to the client.

"A framework embodies some abstract design, with more behavior built in. In order to use it you need to insert your behavior into various places in the framework either by subclassing or by plugging in your own classes. The framework's code then calls your code at these points."


"In a framework, unlike in libraries or normal user applications, the overall program's flow of control is not dictated by the caller, but by the framework.

"(...)A framework has a default behavior."

If the name of a framework is confusing (e.g. the .NET Framework), it was likely named before the modern definition gelled.

Compare this to an SDK. An SDK is everything you need to build a specific type of software deliverable for a specific platform -- the Java SDK (all Java apps), the Android SDK (apps that run on the Android OS), the Windows device driver SDK (device driver for Windows), Google App engine SDK (apps that run on Google's App Engine), etc.

| improve this answer | |
  • Could you answer a similar (but different) question here – Juzer Ali Nov 23 '17 at 8:23

There cannot be a canonical definition for these terms, as different people/companies use the terms in different, subjective, ways.

From experience, the following definitions are often used and are likely the nearest one could get to a consensus definition:

Library A collection of classes/modules/functions with at least some of them being publicly accessible that extend an application.

Framework A collection of classes/modules/functions that allow an application to be built by extending the framework. JEE is an example of this: your code is under the control of the framework, unlike with a library.

API An application programming interface is a library that provides access to some other application or piece of hardware.

SDK A software development kit is a collection of tools (eg compilers, libraries, debuggers, IDEs) for assisting the development of applications against some API using one or more languages.

Having said all that, there are well known examples that break these "rules", eg the ".NET Framework", which is an SDK according to the above definitions.

| improve this answer | |
  • I would say the .NET Framework is "all of the above." – Greg Burghardt Jan 8 '16 at 18:44
  • The .NET Framework is a framework according to your definition. The word implies confinement. The .NET Common Language Infrastructure provides that much like JEE and it controls your code just like JEE. – Martin Maat Jan 8 '16 at 21:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.