- September 30, 2015

CIO Review recently released a special edition of their magazine dedicated to the world of APIs. In the September release, Restlet founder and CTO, Jérôme Louvel, talks about how APIs make the mobile revolution possible.

We are republishing the content of the article below with CIO Review’s consent:

Software developers are turning to REST APIs to deal with the exploding number of human-computer interaction modes, ranging from mobile phones, desktop computers, medical devices, in-vehicle computing, and various consumer devices such as interactive televisions.

REST is a software architecture style that allows all these devices to access data and compute services over the Internet, most types of data networks, or the cloud. For example, when you check the weather on your smartwatch, it uses REST and its HTTP communication protocol to connect to an external source of the weather analysis. In this way, a small, low-powered device such as a watch or a thermostat can take advantage of the compute resources of a large weather forecast system.

The beauty of REST is that the communication from your device such as a TV to a data source such as local news is simple. REST uses the same verbs as your web browser.  These are GET, POST, PUT, and DELETE.

This simple communication process allows companies to build highly scalable systems that can handle dozens of different types of devices and scale to millions of simultaneous users. For example, using the Netflix API, people can use their phone, tablet, XBox, computer, smart DVD player, or TV to access personalized data and create an unique viewing experience for each person.

What type of RESTful services are people using?

To help answer this question, my company Restlet surveyed the general US population online through news sites, entertainment sites and directly on their mobile devices. We collected 530 fully completed surveys.  

People in the US access these types of information:

Emails 51%
Weather 49%
News 30%
Social Networks 29%
Traffic 28%
Stocks, Finances 13%

Of the survey, 56% of people were using smartphones, 51% laptops, and 32% tablets.  People have multiple devices and are getting their data in different ways.

Wide Adoption Despite Problems

The spread of mobile devices is plainly visible in daily life. Our survey results confirm that the majority of the general US population connect to data more than once per day.

Ultimately, the new mobile devices are a huge opportunity for businesses, but there are a few problems that need to be overcome. Massive online adoption is creating enormous challenges for businesses as customers expect a seamless flow of data from different devices.  

Let’s take the example of a customer that inputs data using a mobile phone on a company’s web site. Later, they call the company and interact with the customer service team. How many customers are disappointed or frustrated that they had to give the same data to the call center again? Our survey results indicated that an astounding 86% of Americans are concerned about the ability of call center agents to access information they already provided online.

And an overwhelming majority – 89% of respondents – expressed concern about the safety and privacy of their data when using a connected device. These issues will not quickly be solved.

Despite the concerns, however, it appears that adoption will almost certainly increase. Businesses are adapting by changing the way software is created.

“API-first” Design Method Arises to Solve Data and Device Problems

Many businesses are now planning their APIs first, prior to writing code. This is often called an “API-first” approach. In this new approach, developers are faced with new considerations to design, develop, deploy, manage, and document APIs. An API-first approach is rarely a sudden shift in software design policy within a company. Instead,  businesses usually go through an evolution.

The classic model for software design is a code-first, back-end driven model. In the diagram below, the back-end team starts coding the implementation, or the logic and core functionality first (1).  They then design an API (2) so that multiple devices (3) can access the logic and data.

However, as the number of devices increases, the number of SDKs increase. So the development team is forced into a second evolutionary phase, which is an API-first and back-end driven model. By this, I mean that they design how the APIs will interact with multiple client devices first and then design the back-end system. This is generally done by the back-end team.

As the user interface and overall user experience becomes more important for a business, the back-end and the front-end teams begin to work together to design APIs at the start of a project. This is the third evolutionary phase in software design. I refer to it as “collaborative API-first.” It’s a response to the increase in devices and SDKs but it has its limits as well.

Part of this approach is to use a Mock API to speed up the development process. In the diagram above, the developers build a “Mock API” that sits between the implementation and the actual API. This is a stub API with basic functionality and simulated behavior for external sources.  It is used for development and testing. It lacks the full functionality of the actual API, but it’s  easier to work with as developers create the implementation. The mock API needs to have enough functionality to be usable for testing without having external dependencies.

The development model will again break down as a single API cannot handle the unique experiences for each type of device. In addition to the differences in sensors, screen size, and network connectivity, each device will have different release and upgrade cycles.

The solution is to develop an API-first and front-end driven software development model. In this model, each device will have its own API.

Eventually, we move into a model where the user experience with a large number of devices becomes the top priority. We move into a model where the APIs are not only driven by the front-end and UX teams, they are owned by the front-end team.

It’s a big jump from the previous models of code-first and back-end driven. The change won’t happen at one time. My experience is that software development teams evolve through different stages, changing as their customers demand a seamless experience across multiple devices.

Although cool smartwatches and futuristic IoT devices get all the attention, we should give more respect to the humble and surprisingly simple REST architecture that is making the mobile revolution possible.