Refinance now before rates go up! Get multiple rate quotes at GetMyLender.com.

Difference between Library and Framework

A Library and a Framework are a set of classes, modules and/or code (depending on the programming language) that can be used in your applications.

Suppose you have to maintain log or debugging info in your applications, draw charts, create an specific file formats like .html, .pdf, .xls, connect to a data base, create applications using Design Patterns or simply create some/complete application etc.

These types of problems can be solved using Framework or a Library.

Library :

A library provides a set of routines (functional programming) or class definitions / modules (object oriented programming).

The reason behind writing libraries is simply code reuse i.e. get the code that has already been written by other developers/programmers or write code so that other programmers will reuse that.

Examples of libraries: Network protocols, compression, image manipulation, string utilities, regular expression evaluation, math operations.

Libraries JS : jQuery etc

Framework :

A framework is a skeleton where the application defines the "meat" of the operation by filling out the skeleton. The skeleton still has code to link up the parts but the most important work is done by the application.

Here your code will be called by the framework. The benefit is that developers do not need to worry about a design whether it is good or not, but just about implementing domain specific functions.

A framework is an application which has defined open or unimplemented functions/objects, which may be written by user to complete and customize his application. This usually takes the form of implementing an abstract function/interface, or inheriting from a known object.

Examples of frameworks: Web application system, Plug-in manager, GUI system. The framework defines the concept but the application defines the fundamental functionality that end-users care about.

Frameworks : AngularJS etc

Key features :

Library and Framework both of them defined API, which is used for programmers to use. A library as a certain function of an application, a framework as the skeleton of the application, and an API is connector to put those together. Typical development processes normally starts with a framework, and fill out functions defined in libraries through API.

The main difference between a Library and a Framework is the dependency between their own code, in other words to use a Framework you need to use almost all the classes, modules or code in the Framework, but to use a Library you can use one or few classes, modules or code in the lib in your own application.


Conclusion :

I hope that this article would have helped you in understanding Difference between Library and Framework. Your feedback and constructive contributions are always welcome.


No comments:

Post a Comment