Thursday, February 11, 2016

Difference between a library and a framework?

Library

library is a reusable piece of code which you use as it comes i.e it does not provide any hooks for you to extend it.

Framework

framework is a piece of code which dictates the architecture your project will follow.
Library
Framework
·         A library is a reusable piece of code which you use as it comes i.e. it does not provide any hooks for you to extend it.
·         A framework is a piece of code which dictates the architecture your project will follow.
·         A library will usually focus on a single piece of functionality, which you access through an API.
·         Once you choose a framework to work with, you have to follow the framework’s code and design methodologies.
·         You call a library function, it executes some code and then control is returned to your code.
·         The framework will provide you with hooks and callbacks, so that you build on it.
·         Library doesn’t contain framework.
·         A framework will usually include a lot of libraries to make your work easier