API Driven Development (ADD)

Application Programming Interfaces (APIs) form a crucial role in the application economy and are the foundation of modern applications. Previously existing software development methods prevented development teams from paying more attention to API design, the release periods were lengthy and customer feedback was limited to the operation of the system rather than the API design. Customers did not get the opportunity to work or experiment with the early developmental stages of the APIs. Hence, there was much gap between the creator's design and the clients' needs. As a result, customers stopped using the APIs which in turn brought losses to the company.

The API LifeCycle - From NordicAPIs.com

When the Agile Software development methodology was introduced, there was a chance for software programmers to show a functional preview of their application to customers during the period it was released.
This created an opportunity for software teams to modify their software to meet the customer demands and the requirements of the fluctuating markets.
This method allowed APIs to be integrated with other technologies such as API mocking and virtualization thereby making it possible for clients to make use of the APIs even before they were developed.

API driven development enables software developers to focus on creating applications with APIs. Applications that use APIs were given greater importance and developed to meet customers' needs. Other applications such as user interface, integration points make use of API as their core element.

APIs developed within the Agile framework are done in increments and are subject to regular reviews and suggestions of the customers. This is to ensure that all customer needs are taken care of. Still, this presents some issues such as:

  • Significant effort to accommodate design changes
  • Performance uncertainty
  • Inability to be used for integrations until the API is complete and ready

The solution to these problems mentioned above can be achieved by the use of REST API Mocking Services and Test Automation products.

API Mock Service

API mocking service or API service virtualization simulate restricted or unavailable systems across the software development life cycle (SDLC), making it possible for software developers and performance analysts to work separately to deliver faster, high quality and reliable application. Hence, in developing API-driven development, mocking the API services serve as the basis in developing API which fits to the design requirements.

Test Automation

Test automation products provide great assistance to software developers because they:

  • achieve lower testing cycle times and costs with end-to-end automation.
  • enhance quality by drastically reducing manual testing efforts.
The Method

For an API to be successful, the design and goal of the API must be clearly spelt out. Some of the goals could be:

  • To enhance compatibility with third party systems.
  • To access services from mobile application.
  • To be able to compete with other products that does similar jobs in the market.

A different design approach is required by each goal in order for the objectives to be achieved. Hence, in the course of "API-driven development", understanding the goal and tailoring it to a specific specification are of primary importance.
Teams which adopt Agile Methodology in their development tend to achieve more. The API driven development steps involved for every iteration are illustrated below:
Stages of API-driven Development

Design/Enhance API Specification

APIs are among the biggest assets of a company in today’s' application economy. This can be achieved by using a well designed API that has the following features:

  • Easy to learn and make use of.
  • Easy to expand
  • Simple yet sufficient to meet the customers' needs.

Hence, if an API is not properly designed, it can quickly become a liability and overwhelm the support teams.

To combat this, a lot of work has been done and a number of modelling languages made available which conveys the API design. It is of importance to fully understand which API design is best for developing and creating standard APIs. A number of websites provide more information on this topic.

Develop and Test REST API Mock

When you have an already approved API design, the next step is to create a virtual API or produce a REST API mock. Each API mocking product has a particular way of creating and developing virtual mock services. A set of automation test which employ “rest” case in their creation are often used in testing the developed virtual services.

This process is compatible with Agile teams that follow test-driven development, as the real API are tested before using the automated tests available when it is complete.

Demonstrate and test the REST API Mock

During the Agile development process, each team would demonstrate a version of the API mock to clients and stakeholders at the end of each sprint, in order to obtain valuable feedback early in the development stage.

To demonstrate the behavior of API, a mock service is used because it enables the stakeholders and customers to experience it for them. The automated tests provide the list of validated scenarios which demonstrate the number of requirements that meet a given iteration. Customers therefore can know more of the API even before the real API is available and can provide feedback and suggestions which can be included in the mock service that will be developed in the next increment.

Create the Real API

At the commencement of each iteration, the development team begins building the real API based on the signed off feature and continually improve the mock service based on the feedback received. The automated test is usually used to validate the functionality of the real API. This procedure can be used in every iteration to make sure that their requirements are regularly met and prevent late design changes.


Many ways can be used in introducing an API-driven development process in development teams by using a combination of API service mocking and test automation product to deliver powerful APIs to clients and customer. API-driven development is a field that enhances and improves the overall usability and integration of products and solutions over a period of time thereby making companies successful and relevant in today’s' application economy.
RestCase is one of the pioneers in the REST API driven development field.

Guy Levin

Read more posts by this author.

comments powered by Disqus

Subscribe to REST API and Beyond

Get the latest posts delivered right to your inbox.

or subscribe via RSS with Feedly!