Frameworks vs. SDKs
Asked Answered
M

10

48

What is the difference between a framework and an SDK? Take, for example, the MS platform SDK and the .NET framework. Both have API's, both hide their inner workings, and both provide functionality that may not be quickly/easily accessible otherwise (in other words, they serve a real-world purpose).

So what's the difference? Is it primarily a marketing game of semantics, or are there actual differences in how developers are expected to interact with the software (and conversely, how the developers can expect the software to behave)? Is one expected to be higher- or lower-level than the other, etc?

Thanks!

EDIT: This question applies to SDKs and frameworks in general, not just the two mentioned above.

Marquise answered 8/1, 2009 at 16:10 Comment(0)
I
26

An SDK is expected to offer tools to program against a certain system resource or feature. A Framework not necessarily (although .NET offers a whole set of tools such as the compilers, etc - but these are mandatory for it to work anyways).

So, you could develop a Framework consisting solely of libraries, but if you call it SDK you will be expected to offer something to support development.

Impenetrability answered 8/1, 2009 at 16:15 Comment(3)
That was great explanation. Just to add a bit for the viewers if I want to make anyone understand with the help of an example then: .Net Framework = Set of framework class libraries (FCL) which form the CLR .Net SDK = .Net Framework + C# & VB compiler + MS Build tool for packaging the code written by developer + Debugger + IIS express web server in VS + Many other such things which help you writing program against .Net framework class libraries (FCL) to develop a .Net application.Pitts
Another example: Qt framework (the libraries) and Qt SDK (Qt framework + qmake + Qt Creator + Qt Linguist + ...)Dewees
Short and clear!Worth
P
59

I'll just copy from Wikipedia:

Library:

A library is a collection of subroutines or classes used to develop software. Libraries contain code and data that provide services to independent programs. This allows code and data to be shared and changed in a modular fashion.

Framework:

A software framework, in computer programming, is an abstraction in which common code providing generic functionality can be selectively overridden or specialized by user code providing specific functionality. Frameworks are similar to software libraries in that they are reuseable abstractions of code wrapped in a well-defined API. Unlike libraries, however, the overall program's flow of control is not dictated by the caller, but by the framework. This inversion of control is the distinguishing feature of software frameworks.

SDK:

A software development kit (SDK or "devkit") is typically a set of development tools that allows a software engineer to create applications for a certain software package, software framework, hardware platform, computer system, video game console, operating system, or similar platform. It may be something as simple as an application programming interface in the form of some files to interface to a particular programming language or include sophisticated hardware to communicate with a certain embedded system. Common tools include debugging aids and other utilities often presented in an IDE. SDKs also frequently include sample code and supporting technical notes or other supporting documentation to help clarify points from the primary reference material.

So:

  • Library is code that your application calls.
  • Framework is an application or library that is almost ready made. You just fill in some blank spots with your own code that the framework calls.
  • SDK is a bigger concept as it can include libraries, frameworks, documentation, tools, etc.
  • .NET is really more like a platform, not a software framework.
Phototransistor answered 8/1, 2009 at 19:13 Comment(2)
And what's the difference with a 'engine'Acroterion
@Acroterion an engine is something of a framework which also provides a runtime environment which your programs interact with. I think the key idea is that the engine is "running" with your code controlling or "driving" the actions.Niggardly
I
26

An SDK is expected to offer tools to program against a certain system resource or feature. A Framework not necessarily (although .NET offers a whole set of tools such as the compilers, etc - but these are mandatory for it to work anyways).

So, you could develop a Framework consisting solely of libraries, but if you call it SDK you will be expected to offer something to support development.

Impenetrability answered 8/1, 2009 at 16:15 Comment(3)
That was great explanation. Just to add a bit for the viewers if I want to make anyone understand with the help of an example then: .Net Framework = Set of framework class libraries (FCL) which form the CLR .Net SDK = .Net Framework + C# & VB compiler + MS Build tool for packaging the code written by developer + Debugger + IIS express web server in VS + Many other such things which help you writing program against .Net framework class libraries (FCL) to develop a .Net application.Pitts
Another example: Qt framework (the libraries) and Qt SDK (Qt framework + qmake + Qt Creator + Qt Linguist + ...)Dewees
Short and clear!Worth
G
14

In a nutshell the difference is :

  • You call the SDK functions.
  • The framework calls your functions.

A SDK is like a toolbox with lots of tools and you choose which ones you use and how. You have control but also a lot of decisions to make. That's quite low level.

A framework makes a lot of decisions for you, so you don't have to reinvent the wheel; It's more a "fill in the blanks" approach. Less freedom but you save a lot of time and probably avoid some mistakes.

In the particular case of the .NET framework it also refers to the runtime files needed to run applications using it but it's not the way the word is used in a programming context...

Grummet answered 8/1, 2009 at 16:20 Comment(2)
I'm not sure why this got downvoted... Of the answers so far, it's the closest to my understanding of the meanings of the terms.Corbel
Because the bullet points are incorrect. The functions you call is the API, not the SDK. SDK is a "grey-defined" thing. It's just a framework with additional stuff to help you.Stowe
P
2

It's a grey area but Frameworks tend to be the libraries you code against, SDK's often have extra tools to help you get more out of the Framework. A good example being the .NET Framework SDK which you install separately, the SDK has extra tools such as ildasm, cordb which aren't really parts of the framework.

Ponton answered 8/1, 2009 at 16:17 Comment(3)
Would you say my keyboard+mouse+computer+chair are an SDK? Is VSCode + Git an SDK?Tessy
@JuanPerez Unsure if serious or not.Ponton
"Tools" can mean pretty much anything. (My keyboard is a crucial tool in programming!) Which is why I have a hard time understanding what an SDK really is and isn't.Tessy
H
1

Microsoft SDK could be used by a developer to create their programs. Final users normally do not need it.

Microsoft Framework instead is mandatory if you want to run .NET applications on a machine.

Henchman answered 8/1, 2009 at 16:15 Comment(0)
C
1

I was the lead on Zend Framework through its 1.0 release. We often got comments that it wasn't a "framework" in the sense that developers expected -- they said it was more of a class library.

They expected a framework is more like a set of classes that must be used together for them to work. A framework may also include a set of coding conventions, guiding you to organize your code in a certain way. Also a framework may impose naming conventions for your classes and database entities. And finally, code-generation tools.

Zend Framework was designed to be loosely coupled, so you could use any of the classes standalone if you wanted to. It imposed few conventions on your code or your database. And we had intended to develop code generators but hadn't implemented them yet.

But I still felt that Zend Framework qualified as a framework, instead of an SDK, in one other way: a framework is extensible. It's designed as a set of object-oriented base classes, and the intended usage is that developers either extend these classes, or write simple plug-in classes, to add functionality.

A traditional SDK is not extensible. You simply call API methods in the provided classes, they do what they do, and you deal with the result. Any customization is in your usage of the API and how you make use of the results.

Castanon answered 8/1, 2009 at 18:28 Comment(0)
C
0

A class library provides classes that usually share the same rough application area (mathematics, rendering) but are intended to be used mostly independent of each other.

A framework provides classes that together form a basis for an application that you only extend and flesh out.

An SDK contains everything you'll need to use the technology the SDK is provided for. It's often containing dokumentation, samples and tools alongside the actual core-content which might be a framework or a class library or even something completely different.

Colewort answered 8/1, 2009 at 18:58 Comment(0)
O
0

In one comparison, you could say:
Library -> Framework -> SDK
Framework consists of several Libraries, plus some tools (compilers, etc), and does not target a specific platform. For a platform, there might be several frameworks developed each serving a different purpose. SDK offers you frameworks and everything else you need for developing software for a specific platform.

Osteopathy answered 29/10, 2012 at 7:53 Comment(0)
L
-1

As answered previously in detail so I am going to sum up this laymen language. Suppose you are building a house than you don't have to make bricks from scratch. You can use ready to use bricks ,wooden slabs, metal rods etc. Using them accordingly to build you house efficiently but this is also not enough to build you house you will still be needing labors , builders, tools like machines, buckets, hammers, water, chainsaw etc. To actually build house. So the ready to use bricks ,wooden slabs are framework and necessary items like bricks along with whole kit including labors , tools like hammer and machines is SDK.

Logo answered 18/6, 2022 at 9:17 Comment(0)
T
-1

A library is a set of callable routines, that is, it is code.

In general it should be helpful code that can be re used in many different programs, allowing the developers not to spend time writing generic code that already exists.

A framework is a type of library. Here, we separate libraries into 2 major types:

"Regular libraries" simply give you callable routines that you place in parts of your code.

"Framework libraries" give you a few major routines that do most of what you want to do, and let you replace some parts of their code with your code. So you're basically letting the framework dictate how your program works, and only change a few things to customize it to your objectives.

SDK is an empty buzzword, and has vague and conflicting definitions. The only common ground is that is supposed to help your create a program in a specific environment, such as Android or .NET.

Some say SDK is a collection of executable software, as opposed to callable code (like the framework is).

Some say it's a bit of both. Some say it's just the same as a framework.

Personally I don't take people who use buzzwords like SDK seriously, they're probably just trying to sell smoke with fancy words.

Tessy answered 4/1 at 14:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.