Jun 142013
 
 June 14, 2013  Posted by at 10:57 am Not So Stupid Questions, Uncategorized  Add comments

[To celebrate my first year of programming I will ask a ‘stupid’ questions daily on my blog for a year, to make sure I learn at least 365 new things during my second year as a developer]

Iโ€™m sitting on the train home from Norwegian developer conference and I am so tired, but happy. It was a great event and I got to meet many friends, some old some new. One person I met that I always enjoy talking to was (among others of course) Laurent Bugnion โ€“ the developer behind MVVM Light. I mentioned that I had talked about his framework in my session and he kindly corrected me and told me it was per definition a toolkit and not a framework. That is correct, MVVM Light is a toolkit and not a framework. We talked about the words framework, library and toolkit. Letโ€™s define the three and how they differ.

framework

A framework is a structure, a skeleton. The structure provides the developer something to build by, but the bits and pieces needed is up to the developer to provide. Frameworks often solve a set of problems, and takes care of some boilerplate code the developer would otherwise have to write. A framework is a subsystem that contains the components you need for a set of problems.

A library is a library. A collection of objects that you can use, but in contrast to a framework you donโ€™t have to use all of it- just take the bits and pieces you need.

Martin Fowler

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.

A toolkit is a set of tools for a developer, a good example is MVVM Light, which has a framework (an MVVM framework), bits and pieces that you may or may not use, templates and so on.

  2 Responses to “Stupid Question 195-196: What is the difference between a framework, toolkit and library?”

  1. Why are these distinctions important, if so? ๐Ÿ˜‰

    • Well they are important first because I am Swiss and we love details ๐Ÿ˜‰ but more seriously, they help to precise things. When I present MVVM Light to a new audience, it helps to use the correct words to describe what it does. I guess it’s just what craftsmen do ๐Ÿ˜‰

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

What is 10 + 14 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)