Iris Classon
Iris Classon - In Love with Code

‘Stupid’ Question 13: How do I explain to my friend what a framework is?

[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]

From time to time I get questions about things that I mention on my blog or twitter from non-nerdy/geeky friends. As a part to the 365 questions I’ll add a few ‘how to explain questions’ – because I would love to get more non-programming friends involved in this world so I can share this beautiful world of programming.

.

You often hear programmers talk about frameworks, it’s framework that or framework this. And depending on who you ask, and the context of the question- anything can be a framework. But I would like you to think of the skeleton of a house, you’ve seen those when they start building houses. They set up the basic structure, the foundation; there is a plan, and maybe even a set of rules and recommendations for how to get the most out of this. How much is pre-defined varies, but all the houses with the same framework won’t end up looking the same. And that foundation, skeleton, plans, blueprints and so on is actually just code. Somebody has gone ahead and put together something that we can continue building on, and how much is done beforehand and how much we can add – or how many frameworks can be combined or work together varies. And as with houses, a solid foundation is of very high value as it helps build something faster and more stable – but only if it is a good framework and the builder knows what he/she is doing.

If you have a better explanantion let me know, these things can be really hard! :)

Comments

Leave a comment below, or by email.
hippie
8/2/2012 4:45:39 PM
If your friends are not geek / dev's try giving a exemple relataded to a food = prog and a kitchen = framewok.

Tel them to imagine that to cook something, like your excelent chili con carne, they have everytime, over and over again, to invent or create or make all the tools in the kitchen like knife table water etc etc etc.

The kitchen / framework (frame work) is the tools they have bluid one time, or other people expert, to do better food / code and never repeat that same steps again ...

Hope that help them ... LOL

And sorry for my bad English ...

PS : If your friends say that my theory suks jut let me know and i trash it away :-P 
Yngve Bakken Nilsen
8/2/2012 10:42:05 PM
Great explanation! Even after 8 years in the game I sometimes have trouble explaining this. Perhaps the longer I work the harder it gets to explain other people. :) trying to explain the difference between a framework and a library can sometimes be hard, even to fellow developers! 
Esko Luontola
8/4/2012 2:21:57 PM
"trying to explain the difference between a framework and a library can sometimes be hard, even to fellow developers!"

Your code calls library code. Framework code calls your code. That's the best definition I know of: http://martinfowler.com/bliki/InversionOfControl.html

No idea how to explain the difference to non-programmers, though. It's also known as the Hollywood Principle ("Don't call us, we'll call you"), so maybe an example about making phone calls might help to explain it? 
James Curran
8/6/2012 7:52:17 AM
My way of explaining the difference between a library and a framework, is that a library is a tool -- you use (or don't use) whatever part suits you, while a framework is a way of life: it affects every aspect of how the application is designed and implemented. 


Last modified on 2012-08-01

comments powered by Disqus