My App Broke And it’s all the API’s fault

Shy Ruparel Developer Evangelist | Contentful @ShyRuparel He/Him

Don’t let a CMS get in the way of shipping software. Contentful provides a content infrastructure that enables teams to power content in any digital product.

Let’s talk about Software Engineering

Regardless of what you make Something is gonna break

Stuff breaks

Use APIs Writes APIs

How do we Minimize risk?

If you can change an API In a way that breaks your codebase

And you can’t make that change programmatically

Let’s take a look at Databases

DON’T FUCK IT UP Critical to business Store user data In Sync with Codebase Outages translate to $$ lost

Production should be Non-Trivial to change

Fun Fact: SQL is 44 years old

Database Migrations No more developers manually alternating a DB Schema alterations as code Version Control for Migrations Repeatable and Testable

Cool. Can we talk about APIs again?

Can we learn anything from Continuous Integration?

Simple CI Pipeline Build Test Deploy

WHAT CI DOES • Forces testing and checks on changes • Automates deployment • Cancelable • Repeatable

Saves Time Creates Trust

Process is key

Ok. Now we can talk about External APIs

Treat APIs like Databases

MAKE PRODUCTION NON-TRIVIAL TO EDIT

WRITE/ENABLE PROGRAMMATIC API MIGRATIONS

API KEYS FOR EVERY BRANCH

Automate your changes via Continuous Integration

TEST YOUR APIS

MAKE CHANGE PART OF DEPLOYMENT

Less Simple CI Pipeline Build - Use Branch API Key - Implement API Configuration Changes Test - Run tests that use that API Deploy - Update Production API Key

Let’s look at a practical Workflow

Shy Ruparel @ShyRuparel github.com/shy/talks Image Credits wocintechchat.com Kim’s Convenience XKCD