api design workflows

38
[email protected] API Design Workflow

Upload: jakub-nesetril

Post on 18-Dec-2014

1.751 views

Category:

Technology


4 download

DESCRIPTION

A quick overview of API Design Workflow, describing my views on waterfall API design approach, why we've built Apiary a certain way and random notes from the API industry

TRANSCRIPT

Page 2: API Design Workflows

Overview

• Why are APIs different?

• Why are APIs bad?

• How to fix that?

* APIs = REST/HTTP APIs

Page 3: API Design Workflows

Jakub Nesetril

• backend dev (~8 years)

• frontend dev (~5 years)

• founder of Apiary

Page 4: API Design Workflows

Apiary

• API Design, Documentation & Testing Tools

• 10,000s APIs, developers, companies, ideas

• Largest API community worldwide

Page 5: API Design Workflows

What is an API?

Page 6: API Design Workflows
Page 7: API Design Workflows

API is UI to DataUser Experience

Design

Subjective

Simplicity

Conversion RatesEmotions

ProductivityUsability Studies

Culturally Dependent

Hackathons

Page 8: API Design Workflows

Great! Make good design, right?

Page 9: API Design Workflows

Empathy is HARD!

Page 10: API Design Workflows
Page 11: API Design Workflows

Provider Consumer

Uptime

Caching

Security

Maintenance

Versioning

ValidationCan It Be Done?

Debugging

Support

TTFHW

Example

Latency

Java

Rails

Scala

Erlang

jQuery

ObjC

AngularJS

Page 12: API Design Workflows

So what?

Page 13: API Design Workflows

Traditional API Development

Page 14: API Design Workflows
Page 15: API Design Workflows
Page 16: API Design Workflows
Page 17: API Design Workflows

Design

Implementation

Customer

3-6 weeks

3-6 months

Page 18: API Design Workflows

Problem: API providers don't understand API consumers

(and vice versa)

Page 19: API Design Workflows

Want good APIs? !

Empower the Frontend

Page 20: API Design Workflows

Let's turn that on it's head

Page 21: API Design Workflows

Design

Implementation

Customer

Page 22: API Design Workflows

Frontend developer co-designs an API

Page 23: API Design Workflows

Backend developers get implementation specs

(in form of tests)

Page 24: API Design Workflows

API Blueprint

• human-readable & human-writable

• based on Markdown, you already know it

• structured reasoning about APIs

Page 25: API Design Workflows

# Message of the Day API A simple [MOTD](http://en.wikipedia.org/wiki/motd) API. !# Message [/messages/{id}] This resource represents one particular message identified by its *id*. !## Retrieve Message [GET] Retrieve a message by its *id*. !+ Response 200 (text/plain) ! Hello World! !## Delete Message [DELETE] Delete a message. **Warning:** This action **permanently** removes the message from the database.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18

API Blueprint

Page 26: API Design Workflows

demo

Page 27: API Design Workflows
Page 28: API Design Workflows

API Lifecycle

Design

Prototype

Implementation

Delivery

Feedback

Page 29: API Design Workflows

What happens when you're offline?

Page 30: API Design Workflows

git workflow demo

Page 31: API Design Workflows

Frontend

Backend

Contract

Concurrent Development

mocks

tests

Page 32: API Design Workflows

Apiary for Teams

• roles

• integration with GitHub

• custom docs visuals

• teams up to 20 users

Page 33: API Design Workflows

Random Notes

• PMs aren’t technical, Dev’s aren’t customer-focused

• The hardest thing about APIs is a push to get things right the first time

• For larger teams, create a “style guide”

Page 34: API Design Workflows

PMs aren’t technical, Dev’s aren’t customer-focused

Page 35: API Design Workflows

The hardest thing about APIs is a push to get things right

the first time

Page 36: API Design Workflows

For larger teams, create a “style guide”

Page 37: API Design Workflows

Source Code

Format: https://github.com/apiaryio/api-blueprint

Testing: https://github.com/apiaryio/dredd

JS SDK: https://github.com/apiaryio/apiblueprint-sdk

Page 38: API Design Workflows

@apiaryio http://apiary.io/

!

@jakubnesetril

Thank You Questions?