What do Florence’s Duomo, Hagia Sofia and the Taj Mahal have in common? They are all majestic buildings that withstood the test of time… and are all built with bricks!
There are good reasons why the humble brick is ideal for building intricate, durable structures. It allows for a modular construction, tailored to the manpower available.
Bricks can be produced in large quantities using earthly mud and can be shaped by unskilled workers. Their shape and size are also significant: smooth, uniform, with a length double its width. Bricks fit comfortably in one hand. Moreover, their exterior, or interface, allows them to be dovetailed with one another to give the encompassing structure its robustness.
Similar principles apply to modern software. Today’s programs ‒ a collection of complex logical structures ‒ are built from a multitude of (software) bricks. These components carry a variety of names such as modules, libraries or micro-services, to name a few. The software equivalent of a brick’s exterior is the Application Programming Interface, API for short. This exterior shell packages the complexity of a component’s internals while exposing parts of its functionality to other components.
When a software developer wants to understand how a program works, she would be less interested in peeking inside every constituent component, instead focusing on how these ‘bricks’ connect via their interfaces. APIs facilitate this systematic approach to comprehension by specifying what calls/requests can be made on these components, and how and when to make them (together with the data formats to use).
APIs encourage specialisation and reuse
API technologies are also shaping how software is developed and distributed, leading to the so-called ‘API economy’. APIs encourage specialisation and reuse: instead of building an entire program from scratch, developers are more likely to produce the component they have expertise in and assemble the rest using components produced by others.
Developers may also make their components available to others by advertising their APIs. Such an ecosystem shortens time-to-market and lowers barriers to entry, which fosters innovation and market disruption.
Whitecoats at the Computer Science Department of the University of Malta are developing technologies to improve the correctness of API-based software.
BehAPI (No: 778233) is an H2020 European project studying new ways of augmenting APIs with behavioural (i.e. how) and temporal (i.e. when) information to formally verify software built using APIs.
SecBAPI (No: I22LU01-01), a UM Research Excellence Fund project, investigates how the augmented information can make API-based software more secure.
Adrian Francalanza is a computer science professor at the Faculty of ICT, University of Malta.
Sound Bites
• After upending the financial services industry, APIs are now the main innovation driver in the healthcare space. They are used to integrate electronic health records (EHRs) using secure standards such as FHIR (Fast Healthcare Interoperability Resources), enabling medical teams to access patient data more easily. The new applications and services being built will improve patient outcomes and reduce costs.
• GraphQL, an API query language, is the fastest-growing API framework. Its adoption has increased by 400% in 2022 and is now used by 25% of API developers. Industry analysts predict that this figure could rise to 40% in the next couple of years. Despite its growing popularity, the framework is still susceptible to security vulnerabilities.
For more science news, listen to Radio Mocha on www.fb.com/RadioMochaMalta/.
DID YOU KNOW?
• In 2019, 83% of all internet traffic belonged to API-based services. The travel industry was the largest contributor, relying heavily on geolocation, weather and social-media APIs.
• Open banking ‒ the use of APIs to share financial data and services with third parties ‒ will reach 130 million users by 2024. Healthcare APIs are estimated to be growing 8% annually.
• In 2022, 90% of software developers used APIs. Importantly, 30% of their time was devoted to coding APIs, which is almost double the amount of time spent on debugging (the second most time-consuming developer task).
• There are over two million API repositories on GitHub (a code-sharing platform) and more than 25,000 APIs on ProgrammableWeb (an API directory).
• More than 93% of communications service providers use OpenAPI (a standardised format for APIs) whereas 90% of API developers use REST (a communication protocol).
For more trivia, see: www.um.edu.mt/think.