THE DOSSIER TIMES
LOG: API-DESIGNING-ARTDATE: 2023-05-15AUTHOR: AMIT PRAKASH

API Designing is an Art

API Designing is an Art

API Designing is an Art

APIs are protocols that describe how system components communicate with one another. APIs have grown in popularity in recent years as architectural styles have evolved. The graphic below depicts how the emergence of microservices and cloud-native apps increases service granularity. In monolithic applications, in-process calls are replaced by inter-process calls in microservice and serverless apps. Furthermore, each process may run on a distinct physical server, and service calls may fail owing to a variety of network difficulties.

Increased service complexity highlights the importance of more rigorous API design.

API First

"API First" has evolved as a prominent software development paradigm over the last decade. It puts API design ahead of system design. APIs are used as a common communication language by many functional teams and systems. Frontend developers, backend developers, and QA teams, for example, collaborate to define APIs based on system needs. These APIs are used to specify business needs and system designs. Each team then works autonomously before reconvening during the development testing phase.

The following diagram contrasts the "Code First" and "API First" methods. APIs, sometimes known as "documentation" in the "Code First" philosophy, are consequences of system designs. The "API First" strategy starts with API requirements and ends with API-driven tests, putting APIs at the centre of the software development cycle.

image

"API First" offers several advantages:

  1. Improved system integration. “API First” encourages developers to carefully consider system interactions from the project’s outset, reducing the need for ongoing modifications during development.

  2. Enhanced collaboration and quality. APIs serve as a shared specification within the organization, allowing developers, testers, and DevOps to work independently. Agreeing on APIs at the project’s beginning helps eliminate uncertainties and boost software quality.

  3. Increased scalability. With defined interfaces for each service, scaling becomes more manageable by spinning up new instances and adjusting load balancer settings.

In addition to efficiency and transparency, the API-first design also fosters network effects.

In 2002, Jeff Bezos issued the famous API mandate, an early version of “API First”. As a result, systems within the organization became Lego-like building blocks, creating an open ecosystem. The value of this ecosystem grows as more participants leverage APIs to develop new products or services, leading to network effects. Amazon Web Services (AWS), for example, has since become a significant revenue source for the company.

It is quite visionary to mandate that all systems be designed with scalability and flexibility in mind. As a result, the company can adapt swiftly to changing business conditions.

API Architectural Styles.

Different API architectural styles use different communication protocols and data formats.

An overview of common styles is shown in the diagram below.

image 💡

THE ARCHITECTURE LOG

Explores the design decisions, trade-offs, and hidden complexity behind real-world software systems.

Subscribe on LinkedIn

Join 2,439+ Subscribers · Published Weekly

INDEX TAGS:#PreflightParty#hashtag#SecurityFirst#hashtag#DataHarmony#hashtag#NoMoreWebWalls
REVIEWED
— CLASSIFIED BACKEND ENGINEER NOW OPERATIONAL — FIELD REPORTS AVAILABLE — CASE FILES ACCESSIBLE FOR IMMEDIATE REVIEW — TRANSMISSION SECURE — PROCEED TO INTELLIGENCE PORTAL    — CLASSIFIED BACKEND ENGINEER NOW OPERATIONAL — FIELD REPORTS AVAILABLE — CASE FILES ACCESSIBLE FOR IMMEDIATE REVIEW — TRANSMISSION SECURE — PROCEED TO INTELLIGENCE PORTAL