PROGRAMMING: Libraries and Frameworks... Do you know the difference?

in #stemng6 years ago (edited)


source

INTRODUCTION

As a web developer new technologies come into existence frequently, and being able to keep up with the trends is a demanding feat. So last week I asked some folks to differentiate between a framework and a library and I noticed a lot of people actually think a framework is a library and vice versa. But this is not right, hence the need for me to write this post which aims to show the difference between a framework and a library with respect to use in computer programming.

LIBRARIES

"In programming, a library is a collection of precompiled routines that a program can use. The routines, sometimes called modules, are stored in object format. Libraries are particularly useful for storing frequently used routines because you do not need to explicitly link them to every program that uses them." - Webopedia

Libraries are basically a collection of reusable code already written by other developers, this reduces the stress of having to write these codes from scratch and also increases efficiency. A typical example is the jQuery library. jQuery is the best cross browser library at the moment, this means that once code is written in jQuery it creates a consistent interface which runs uniformly across all browsers. It also allows developers to write fewer lines of code which still carry out the same tasks or function that is expected of that line of code.


source

FRAMEWORKS

"A software framework is an abstraction in which software providing generic functionality can be selectively changed by additional user-written code, thus providing application-specific software. A software framework provides a standard way to build and deploy applications. A software framework is a universal, reusable software environment that provides particular functionality as part of a larger software platform to facilitate development of software applications, products and solutions. Software frameworks may include support programs, compilers, code libraries, tool sets, and application programming interfaces (APIs) that bring together all the different components to enable development of a project or system." - Wikipedia

A framework is the structure (skeleton), of an application without the basic functionalities, so what the developer does with a framework is to add the necessary functionalities needed to make the intended app built come alive. A typical example is the Bootstrap Front-end framework which is typically used to design web applications and website. What bootstrap does is provide the developer with a predefined container which can adapt to any screensize (responsiveness). This enables the developer to build an app once and the app will run seamlessly across all screen sizes.


source

SUMMARY

To keep this simple, a frame work is a predefined and designed environment (structure) which a developer uses in building a product by further adding or removing code from the framework. While a library is(are) one of the tools used in modifying or extending the framework to produce the required result or product (fully functional web application or website).

References

Webopedia
Wikipedia

Coin Marketplace

STEEM 0.21
TRX 0.13
JST 0.030
BTC 66917.83
ETH 3499.90
USDT 1.00
SBD 2.89