Popular items

 

API, Library and Framework. What’s the difference?

Blogpost by: Pedro Bento
From: Thursday 22 December 2016
otlogofclinkedin

As my first blog entry and as a software developer working at Onetrail B.V. I’m going to write (of course) about some technical stuff, more precisely the difference between API, Library and Framework. So, what is this all about?

API – Application Programming Interface

Basically, an API is a set of protocols, subroutines and tools to develop software programs. Like a graphical interface, the objective of an API is to make the developer’s work easier. To achieve this, an API provides remote calls, object classes, data structures or variables, which are all the blocks required for a developer to use certain technologies in his application, reducing the cognitive load to which he is exposed. The maintenance and development of applications that use APIs, becomes more expensive and time consuming, without proper documentation. This, should contain all the relevant information about the services available in the API, as well as the way they work, so the developer knows what’s the expected response when interacting with it.

Despite the three components introduced being different from each other, there is a strong connection between an API, library and framework. An API describes a behaviour while a library contains all the implementation of the rules used in this behaviour. Regarding the API-framework relation, an API is the public side of a framework, which means, from all the methods implemented in a framework, only the ones relevant to the user will be presented in an API.

Library

As we mentioned in the previous section, a library is composed by a set of rules used by an application, this means the library contains all the implementation for the expected behaviour. Example given, when a programmer wants to develop an application, he can use a library to make the system calls instead of implementing them. The code available in the library is independent from the application itself and is structured in a way that it can be used and reused by multiple applications, without these being connected between each other. These libraries, allow the code to be shared by multiple developers, which makes it easy when developing new software projects.

Framework

Last but not least, a framework is composed by a group of libraries that allows to execute a bigger operation. These frameworks can be seen as development platforms, which should be adapted to the developer’s requirements. In the end, a framework can be seen as the skeleton of the application, for example, considering a team that is developing a website for a company, by using a framework, they can focus their efforts on specific code for the website itself instead of all the handling and management of the requests.

Follows a simple overview of what we talked about:

Here, we presented the main differences between these three components trying to keep it as simple as possible for better understanding. Despite the strong connection between them, we can see that these have different goals and functions.

API, Framework and Libraries at Onetrail

As an IT company, there is an important link between Onetrail and these elements. Onetrail provides API’s to its customers, allowing them to interact with our services, e.g. price and availability service, granting them up-to-date information about their favourite products. To achieve this, Onetrail resorts to public Java libraries as well as our own internal utility and services libraries, developed by our developer’s Team, always with full professionalism and commitment to achieve excellence quality results. Regarding Frameworks, at Onetrail, we use (next to other frameworks): JSF Primefaces for projects requiring graphical interface and Redhat Fuse ESB for system integration.

Primefaces: http://www.primefaces.org/
RedHat: https://www.redhat.com/en

« Back to Blogs

Pedro Bento

Java Developer

» More information

Add your reply

Reactieformulier

They chose Onetrail