ABCs of API Driven Development

ABCs of API Driven Development

With the ubiquitous question of  “What is API?” being answered in multiple forums, lets start with a more interesting and relevant question - “Why APIs?”

Why APIs?
The most important aspect of “Why APIs?” is that it brings in standardization of interfaces in the development process.  Developers get to work on structured and standardized APIs that are bound not to change their underlying behavior, irrespective of the technology or components used underneath.

APIs also take care of hiding the complexity of underlying implementation, bring in modularity and separation of concerns, which lets independent decoupled services to be implemented and tested.  

The proliferation of SaaS applications with exposed web APIs gives a new dimension to application development, where the developer has to focus on coding the business logic alone.  Other external subsidiary services, like user management, logging, dashboards, deployment  etc are made available by calling these services (3rd party or inhouse services) through APIs.  This speeds up the app development time manifold.  

What is API Economy?
The business reason of “Why APIs?” is  even more intriguing, where APIs act as gateways to enterprise digital assets.  Organizations treat APIs as an important revenue channel - In fact in some organizations like salesforce.com, APIs contribute to more than 50% of total revenue.  API’s ability to generate revenue by monetizing digital assets has ushered in a new way of shoring up enterprise revenues and this phenomena needed a new jargon and the world called it as “API Economy”.

What is API Driven Development (ADD)?
ADD in its current form is expected to have the following characteristics…

  • An API First Design where the API is the first artifact that is to be created during the app development process.  API contracts (API Specification/Signature including the name, parameters, types etc) are either created by dedicated API architects or by front-end developers, who are responsible for creating the end user experience.  API contracts are finalized in collaboration with front end and back end developers.
  • Once the API contracts are finalized, the Front end developers build mocks around APIs and create and refine the end user experience.   In parallel, the back end developers implement the underlying logic of the APIs.  Dedicated test suites are created around these APIs and in a way foster the idea of Test Driven Development.  Finally the implementations of the front end and back end developers are brought together.  This is bound not to fail as long as the developers have coded honoring the API contracts as established in the first step.
  • At a code implementation level, APIs these days are typically designed using the REST architecture with JSON payloads.  SOAP, XML and other standards are found to be heavy and going towards oblivion.

Benefits of ADD?
In addition to  the benefits of  APIs  listed under the “Why APIs?” section, API Driven Development adds its own set of benefits to make the life of a developer easier and the process of app development simpler...

  • Faster App Development
    ADD allows the developer to focus only on the business logic.  In ADD, it is expected that all subsidiary services will be accessed through APIs.  Also the initial agreement of the API contracts, parallel implementation by the front and back end teams and hassle free merge of the front and back end code brings about a huge time savings in app development time
  • Focus on just your business logic
    It is expected that the developers will use APIs (3rd party/internal-cross-team) for all the subsidiary services like user management, logging etc, so that the focus of development is purely on the implementation of business logic and not on spending time implementing the skeletal structure of the app.  In fact, in the thriving API ecosystem, API marketplaces (like www.mashape.com) have come up to make the process of discovering and consuming the required APIs much more easier.
  • Better documentation
    One thing you will observe in all the  enterprises who have made it big in API economy, viz Twitter, Expedia etc, is that their APIs are easy to use.  Their APIs are easy to find and have great documentation surrounding their APIs.  An effective API is defined by an effective documentation around it.  In fact there are API tools like Swagger which have sprung up to aid in the process of describing and visualizing web APIs.  In summary, a positive side effect of ADD is great API documentation, which typically is a neglected aspect of the traditional product development process
  • Inherently Micro Service Architecture (MSA) based applications
    One of the aspects we discussed in the “Why APIs”” section was modularity.  Apps developed using ADD tend to be modular in nature,  with every module representing a service (3rd party or own).  The main application itself seems to be a collection of micro apps talking to each other using APIs.  This app architecture is called MicroServices and has its own set of benefits.  For example, If there is a load on the user management service of an MSA app, we can scale that user management service by adding more hardware resources.  Compare this with traditional monolith app architecture, where the entire app has to be scaled, though only a part of the app is loaded.
  • Your app is ready for the connected world 
    With proliferation of smart devices and the evolution of the API economy, we are heading towards a digital world where everything is connected through APIs.  Forrester calls this as “APIs become the digital glue” and lists it as a top technology trend to watch for 2014-16.  With API Driven Development having API as the fulcrum, your app is will not just survive but also thrive in this connected world.

What next for ADD?
ADD is a powerful development process and is gaining prominence at a steady pace.  What is needed to make ADD as the default development approach in enterprises?  Lets discuss that in a later post, where I talk about what are the expectations for the next gen ADD.

Thanks. Excellent summary of the whys and hows of what's driving the API Economy. What seemed to be missing though is security - those valuable digital assets from which revenue can be generated are equally valuable to people who would use them for their own purposes. What would you recommend to prevent intrusion or abuse of the API? Any comments appreciated.

To view or add a comment, sign in

More articles by Karthick Viswanathan

Others also viewed

Explore content categories