My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more
Tools for the Modern API Developer

Tools for the Modern API Developer

Anthony Morris's photo
Anthony Morris
·Dec 14, 2020·

6 min read

APIs can be as simple as 1 endpoint for use by 100s of users or as complex as the AWS APIs with 1000s of endpoints and 100s of thousands of users. Building them can mean spending a couple of hours using a low-code platform or months of work using a multitude of tools. Hosting them can be as simple as using one platform that does everything we need or as complex as setting up and managing ingress control. Also security, caching, failover, metrics, scaling etc. are a natural headache for anyone involved.

What they all have in common are three basic steps to go from nothing to a running API. Screenshot 2020-11-10 at 18.11.33.png

Each of these steps has its own set of API design tools. Here are some I’ve used and popular alternatives.

Design

REST is the most popular API interface and has the best tooling. Our design output for REST services always includes an OpenAPI specification. The specification language can be tricky to get right in JSON (how many curly brackets?) or YAML (how many spaces?) so a good editor saves a lot of time. Four popular ones are:

All of them offer additional functionality like documentation, testing and collaboration so are much more than just specification generators.

Build

I want to keep the time I spend building, maintaining and fiddling with infrastructure to the minimum so I make extensive use of services for database, email, queue, security or other commodity type functionality. The services I’ve used and some of their alternatives are:

Database

Email

Queue

Security

Once I’ve farmed out as much functionality as I can, what’s left is typically the bespoke business logic and the glue between all the external services.

Logic

Business Logic is commonly used to enable:

  • Trigger automation such as email and push notifications on developer-defined changes in the data store.
  • Optimizing the data exchange with the app by joining multiple data collections.
  • Validating app user actions in order to enforce business rules.
  • Providing a means to host platform-agnostic code and save development time on multi-platform apps.

Programming languages

Skilled developers can, of course, use their favourite programming language to build the bespoke bits. Most programming languages have one or more frameworks to help reduce the boilerplate.

Low-code

To build it I always go for the low-code option because of the speed it offers. Two low-code tools that allows me to do pretty much anything and connect to most services are

If you haven’t recently tried a low-code tool I suggest trying one for your next small project. Pick something that you want to get out of the door quickly. Even better if you expect it to be mostly boilerplate. You might be surprised at how much they can improve your development speed.

Severless

Another interesting angle to try is building ‘serverless’ functions using something like AWS Lambda or Azure functions to implement the API. I’ve found that the architectural complexity eats a lot of time but if you’re already familiar with those platforms it might be an easy way to build a couple of endpoints.

Host

The simplest thing to do is to use one of the hosting platforms that supports your programming language of choice. Services like

Or in the low-code case the low-code platform does the hosting.

Conclusion

It’s amazing how far we’ve come since we hacked around in BASIC on an IBM XT with 128 KB of RAM. If you wanted a database you needed to build it yourself. If you wanted a queue you needed to build it yourself. API? What’s that?

Now APIs are everywhere. They help us integrate third-party features, connect enterprise systems, and exchange data between apps. Learning how to build rest API turns regular developers into digital superheroes. Today, you don’t need to be an experienced developer to build complex applications using high-performance parts with the minimum of effort and, if you use the right tools, the minimum of code.