More than the Sum of its parts, the API's whole

Post on 08-May-2015

1067 Views

Category:

Technology

6 Downloads

Preview:

Click to see full reader

DESCRIPTION

This presentation will walk you through the importance of APIs and key considerations to have when creating one.

Transcript

More than the sum of its parts, the API’s whole

Josep M. Pujol

3scale – http://3scale.net/

josep@3scale.net – @solso at Twitter

Why do we need API’s?

Source: Dion Hinchcliffe, http://blogs.zdnet.con/Hinchcliffe

Web Site

Your Digital Assets

Online Population

Source: Dion Hinchcliffe, http://blogs.zdnet.con/Hinchcliffe

Web Site

3rd Party Apps

WidgetsGadgetsBadges

Social Network (Facebook, Opensocial)

Mobile Apps.

APInon-visual services

Your Digital Assets

Online Population

Extended Reach

Source: Dion Hinchcliffe, http://blogs.zdnet.con/Hinchcliffe

Web Site

3rd Party Apps

WidgetsGadgetsBadges

Social Network (Facebook, Opensocial)

Mobile Apps.

APInon-visual services

Your Digital Assets

Online Population

Extended Reach

Is that all?

API is about Connectedness

• A bit of history,

API == Application Programming Interfaces

API is about Connectedness

• A bit of history,

API == Application Programming Interfaces

This is about code...

API is about Connectedness

Connected code == mechanism

API is about Connectedness

Connecting abilites == society

There is more than code

An API allows to open what your company does best...

... and to access the best of others

To result in something bigger than the sum of its parts

What do you glue with API’s?

DATA

What do you glue with API’s?

DATA

VISUALIZATION

What do you glue with API’s?

DATA

SERVICES

VISUALIZATION

What do you glue with API’s?

DATA

SERVICES

VISUALIZATION

Sounds familiar?

What do you glue with API’s?

DATA

SERVICES

VISUALIZATION

(M)ODEL

(C)ONTROLLER

(V)IEW

Yep! the MVC software architecure

What do you glue with API’s?

DATA

SERVICES

VISUALIZATION

(M)ODEL

(C)ONTROLLER

(V)IEWMVC connects components

API connects businesses

Disclaimer

If what you offer sucks, don’t bother to cover it up with an API

Writing a sucessful API

• If you are a programmer you know how to write an API

However, there are thingsthat can make it or break it

Writing a sucessful API

• The simpler the better

– REST >> SOAP, JSON > XML– Functionality should be clear and

consice• If you do not know how to name it,

you are doing it wrong

– Adding is much more difficult than removing• Still, consider versioning since day 1

– API needs to be implementation agnostic

– Names should be self-explanatory

Writing a sucessful API

• Implementation

– Watch out latencies• A human can wait 200ms, a

machine might not

– Machine generated traffic• Usage patterns and load can be

totally different than human generated traffic

– Handle errors beautifully• Don’t assume intelligence on the

other side

Writing a sucessful API

• Documentation

– Document well, not everything• code is not the best documentation,

your users – developers -- won’t see it

– Provide code examples for your API

– Write plugins for multiple languages• Will make your users life easier and

help getting your API generic

Writing a sucessful API

• Know your “users”

– They are developers like you, therefore “special”

– They are very comfortable with code examples and online docs

– Developers do not like talking to people, let alone sales• Remove hurdles like approval steps or

sales pitches to hook with your API

– Feedback is always good, in this case critical

Writing a sucessful API

• Be open• Focus

– Your API needs to offer your core business to be connected to

– For the overhead derived from having a public API such as:

– Access control– Analytics and reporting– Billing and payments– Developer portal

there are API solutions,

Writing a sucessful API

• Be open• Focus

– Your API needs to offer your core business to be connected to

– For the overhead derived from having a public API such as:

– Access control– Analytics and reporting– Billing and payments– Developer portal

there are API solutions, e.g.

Full Disclosure: I do work for 3scale

top related