api design: an adoption-centered approach

55
API Design Brian Mulloy @landlessness Marsh Gardiner @earth2marsh An Adoption-Centered Approach

Upload: apigee

Post on 27-Aug-2014

1.387 views

Category:

Software


5 download

DESCRIPTION

Application developers are the customers of your API. Success is measured by how quickly those developers enjoy success using your API in their applications. And rapid adoption of an API by your internal, partner, or external developers is all about design. Building upon their prior work in API design, Marsh Gardiner and Brian Mulloy unveil RV, a style of API design that embraces developer adoption as its guiding principle. They explore the constraints and opportunities introduced by RV and discuss RV's place in the context of other design approaches like REST and Hypermedia. See the youtube video of this webcast https://www.youtube.com/watch?v=u-bGz9HQIuo

TRANSCRIPT

Page 1: API Design: An Adoption-Centered Approach

API Design

Brian Mulloy@landlessness

Marsh Gardiner@earth2marsh

An Adoption-Centered Approach

Page 2: API Design: An Adoption-Centered Approach

@landlessnessBrian Mulloy

@earth2marshMarsh Gardiner

Page 3: API Design: An Adoption-Centered Approach

http://iloveapis2014.com

Page 4: API Design: An Adoption-Centered Approach

groups.google.com/group/api-craft

Page 5: API Design: An Adoption-Centered Approach

youtube.com/apigee

Page 6: API Design: An Adoption-Centered Approach

slideshare.net/apigee

Page 7: API Design: An Adoption-Centered Approach

Integers as a Service

Page 8: API Design: An Adoption-Centered Approach

Overview

• How did we get here?• Where are we now?• Where are we going?• How are we going to get there?• Questions

Page 9: API Design: An Adoption-Centered Approach

How did we get here?

Page 10: API Design: An Adoption-Centered Approach

In the beginning…

Page 11: API Design: An Adoption-Centered Approach

SOAP and XML-RPC

Page 12: API Design: An Adoption-Centered Approach

REST

Page 13: API Design: An Adoption-Centered Approach

The rise of…• Software as a Service• Web Mashups• Virtualization• User Experience• Mobile

Page 14: API Design: An Adoption-Centered Approach

Web vs App

Page 15: API Design: An Adoption-Centered Approach

Technology unlocks technology…

Page 16: API Design: An Adoption-Centered Approach

Gehry vs Winnebago

photo: uggboy

Page 17: API Design: An Adoption-Centered Approach

Where are we now?

Page 18: API Design: An Adoption-Centered Approach

Refocusing API design

Page 19: API Design: An Adoption-Centered Approach

Passion (and controversy)

Page 20: API Design: An Adoption-Centered Approach
Page 21: API Design: An Adoption-Centered Approach

API Craft Conferencehttp://api-craft.org

Monday, July 28th – Wednesday July 30th

Page 22: API Design: An Adoption-Centered Approach

Hypermedia PanelAPI Craft Conference - http://api-craft.org

• Collection+JSON– Mike Amundsen

• Hydra– Markus Lanthaler

• Mason– Jørn Wildt

• HAL– Mike Kelly

• JSON API– Steve Klabnik

• Siren– Kevin Swiber

Page 23: API Design: An Adoption-Centered Approach
Page 24: API Design: An Adoption-Centered Approach

Gehry vs Winnebago

photo: uggboy

Page 25: API Design: An Adoption-Centered Approach

Designing for adoption

Page 26: API Design: An Adoption-Centered Approach

Resource(a thing that lives somewhere)

26

IP: 173.194.70.102 google.com➡Twitter: 14352786 @earth2marsh➡

https://github.com/apigee

Page 27: API Design: An Adoption-Centered Approach

Verb

Page 28: API Design: An Adoption-Centered Approach

Applying RV patterns

Page 29: API Design: An Adoption-Centered Approach

Collections and entitieshttps://api.stripe.com/

Summary of Resource URL Patterns/v1/charges/v1/charges/{CHARGE_ID}/v1/coupons/v1/coupons/{COUPON_ID}/v1/customers/v1/customers/{CUSTOMER_ID}

Page 30: API Design: An Adoption-Centered Approach

Versions

/2010-04-01/Accounts/Twilio

/services/data/v29.0/sobjects/Account

Salesforce

/v2/usersFoursquare

Page 31: API Design: An Adoption-Centered Approach

Query Parameters

/1.1/search/tweets.json?q=%23superbowl &result_type=recent

Twitter

Page 32: API Design: An Adoption-Centered Approach

Header Parameters

Page 33: API Design: An Adoption-Centered Approach

Conveniences

/meFacebook

/v1/people/~LinkedIn

/v2/checkins/recentFoursquare

Page 34: API Design: An Adoption-Centered Approach

Formats

/users/3207.json

SoundCloud/users/3207

Page 35: API Design: An Adoption-Centered Approach

Formats

Page 36: API Design: An Adoption-Centered Approach

Actions

/search?q=watermelon&type=post

Facebook

/convert?from=EUR&to=CNY&amount=100(hypothetical)

/droplets/{droplet_id}/rebootDigitalOcean

Page 37: API Design: An Adoption-Centered Approach

Authentication

Page 38: API Design: An Adoption-Centered Approach

Dates

"created_at": "Thu Nov 03 05:19:38 +0000 2011"

Twitter

"DateTime": "2011-10-29T09:35:00Z"Bing

"createdAt": 1320296464Foursquare

Page 39: API Design: An Adoption-Centered Approach

Filters

/me?fields=name,birthday,photos.limit(10) .fields(id,picture),videos.type(tagged) .limit(10).fields(id, source)

Facebook

Page 40: API Design: An Adoption-Centered Approach

offset, limitFacebook

page, rppTwitter

start, countLinkedIn

Pagination

Page 41: API Design: An Adoption-Centered Approach

Pagination

offset, limitFacebook

Page 42: API Design: An Adoption-Centered Approach

HATEOAS and the Hypermedia Constraint

Page 43: API Design: An Adoption-Centered Approach

Hypermedia

Page 44: API Design: An Adoption-Centered Approach

Great moments in mishandled error code history

Page 45: API Design: An Adoption-Centered Approach

Errors

Page 46: API Design: An Adoption-Centered Approach

SDKs

Page 47: API Design: An Adoption-Centered Approach

Perfect is the enemy of done

Page 48: API Design: An Adoption-Centered Approach
Page 49: API Design: An Adoption-Centered Approach

General philosophy

Page 50: API Design: An Adoption-Centered Approach

Questions

[email protected], @ResourceVerb

[email protected], @landlessness

[email protected], @earth2marsh

Page 51: API Design: An Adoption-Centered Approach

THANK YOU

Brian Mulloy@landlessness

Marsh Gardiner@earth2marsh

Page 52: API Design: An Adoption-Centered Approach

THANK YOUSubscribe to webcasts at:youtube.com/apigee

Page 53: API Design: An Adoption-Centered Approach

THANK YOUQuestions and ideas to:groups.google.com/group/api-craft

Page 54: API Design: An Adoption-Centered Approach

THANK YOUWebcast slides at:slideshare.net/apigee

Page 55: API Design: An Adoption-Centered Approach

THANK YOU

Brian Mulloy@landlessness

Marsh Gardiner@earth2marsh