Thursday, September 9, 2010

What is framework and how it differs from library?

A library is essentially a set of functions that we can use in our projects, libraries are bundled into jar (java) usually organized into classes. Each call does some work and returns control to the client.

A framework is same as libraries in the structure but differs in the design and functionality with more behavior built in. In order to use it you need to insert your behavior into various places in the framework either by sub-classing or by plugging in your own classes. The framework's code then calls your code at these points.

In short frame is the best possible use of basic libraries, as the frameworks are usually built on the top of libraries.

Inversion of Control is a key part of what makes a framework different to a library.

Search Ranjeet's Blog