Frameworks vs SDK – Understanding the Blurred Line

frameworkssdkterminology

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.

Best Answer

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."

Wikipedia:

"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.

Related Topic