Building APIs Mobile @ the Forum Mobile+

Post on 26-Jun-2015

295 views 0 download

description

Minha apresentação no Forum Mobile+ em São Paulo (Setembro/2013). Facebook, Google+, Twitter, Linkedin, Flickr, Evernote, Netflix, Amazon, eBay, Extra.com & Mercado Livre. Todos eles possuem Apps sensacionais suportados por excelentes APIs. Essa apresentação cobre a importância de expor e gerenciar APIs para projetos Mobile. Mostra também diversas boa práticas sobre como criar APIs de sucesso. --------------------------- My presentation at the Forum Mobile+ in São Paulo / Brazil http://convergecom.com.br/portal/eventos/forum-mobile/ Facebook, Google+, Twitter, Linkedin, Flickr, Evernote, Netflix, Amazon, eBay, Extra.com & Mercado Livre. All of them have great apps supported by great APIs. This presentation covers the importance of exposing and managing APIs on mobile projects. It also shows several Best Practices on how to design and expose successful APIs.

Transcript of Building APIs Mobile @ the Forum Mobile+

Construindo APIs

Mobilekleber.bacili@sensedia.com

Twitter: @kleberbacili

Kleber Bacili

Sobre a Sensedia

Empresa brasileira, sediada em Campinas com escritórios em São Paulo e nos EUA

Profundo conhecimento em:

SOA (Arquitetura Orientada a Serviços)

API (Application Programming Interfaces)

Posicionada como visionária no quadrante mágico em SOA do Gartner(*)

(*) Magic Quadrant for Integrated SOA Governance Technology Sets, 2009

Alguns Clientes

They are

Great APPs!

Supported by

Great APIs

APIsDados ou funções de negócios expostos via web para outras aplicações consumirem

Super Buzz!

Essencial, quando?

App é Front-end

Multi-plataforma

Multi-canais (+)

Essencial, quando?

INTERNET DAS COISAS

App é Front-end

Multi-plataforma

Multi-canais

Open (+)

Essencial, quando?

Why Open?

Video Link:http://www.youtube.com/watch?v=7r7QpIDEI_o

KEEPCALM

AND

BUILDAPIs

1 TECNOLOGIAS ADEQUADAS

2 DESIGN CUIDADOSO

3 CONTROLE & SEGURANÇA

5 ALCANCE AMPLIFICADO

4 ONBOADING FACILITADO

Atributos Valiosos para sua API

Atributo #Tecnologias Adequadas

RESTSOAP vs.

POST /GetStock HTTP/1.1

Host: www.example.org

Content-Type: applicaNon/soap+xml

<?xml version="1.0"?>

<soap:Envelope

xmlns:soap=”http://www.w3.org/2001/12/s

oap-envelope"

soap:encodingStyle=”http://www.w3.org/

2001/12/soap-encoding">

<soap:Body

xmlns:m=”http://www.example.org/stock">

<m:GetStockPrice>

<m:StockName>GOOGL</m:StockName>

</m:GetStockPrice>

</soap:Body>

</soap:Envelope>

GET hXp://example.org/stock/GOOGL

RESTSOAP vs.

RESTRepresentational State Transfer

Prefira

JSONXML vs.

JSONXML vs.

{

"symbol": ”GOOGL",

"price": 94.72,

}

<?xml version="1.0"?>

<soap:Envelope

xmlns:soap="http://www.w3.org/2001/1

2/soap-envelope"

soap:encodingStyle="http://www.w3.or

g/2001/12/soap-encoding">

<soap:Body

xmlns:m="http://www.example.org/stoc

k">

<m:GetStockPriceResponse>

<m:Price>94.72</m:Price>

</m:GetStockPriceResponse>

</soap:Body>

</soap:Envelope>

Prefira

JSONJavascript Object Notation

Atributo #

Use do

jeito certo!

(1/2)

(2/2)

Use do

jeito certo!

Error Codes padronizados

Versionamento

Profundidade

Caching

Paginação

Compactação

Filters: Atributos na query string

Atributo #

ThrottlingProteja o seu Backend

Log Trace

Performance

Disponibilidade

Identidade, Autorização e Privacidade

Identificar App (?)

Identificar Usuário (?)

Identificar Device (?)

Segurança no Canal (HTTPS?)

Atributo #

“Não ao PDF de 80 páginas enviado por e-mail”

Request a Key

Experimentação Simplificada

Documentação Interativa

Ambiente de Sandbox

Atributo #

Onde seu

Público está?

Forum de discussão

Blog para as novidades

Eventos especializados

Hackathon

http://www.eventbrite.com/event/8247246737

www.linkedin.com/groups/API-Web-Services-Brasil-5000376 www.meetup.com/API-Crafters-Brasil/

Sign-ups

Apps in Production

Total Calls

Blocked Calls

Success / Errors

Data Transferred

Top Apps

Top Resources

-

500,000

1,000,000

1,500,000

2,000,000

2,500,000

jan feb mar apr may jun jul aug sep oct nov dec

AllAPICalls BlockedCalls

Melhoria Contínua

Para melhorar você precisa entender como

a sua API está sendo usada

Que tal:

developers.[you].com

?

1 TECNOLOGIAS ADEQUADAS

2 DESIGN CUIDADOSO

3 CONTROLE & SEGURANÇA

5 ALCANCE AMPLIFICADO

4 ONBOADING FACILITADO

Atributos Valiosos para sua API

Construindo APIs

Mobilekleber.bacili@sensedia.com

Twitter: @kleberbacili

Thanks!

Imagens dessa apresentaçãohttp://www.flickr.com/photos/chris_tomlinson/9436208737http://www.flickr.com/photos/snaptheworld/5855710053http://www.flickr.com/photos/snaptheworld/5855710163http://katetharwood.wordpress.com/2012/01/http://blog.atrinternational.com/bid/176935/Technology-Jobs-and-Trends-for-2013http://www.flickr.com/photos/gerarddonnelly/7248701466