Construindo APIs Mobile

48
Construindo APIs Mobile [email protected] Twitter: @kleberbacili

description

Apresentação do CEO da Sensedia, Kleber Bacili, 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. --------------------------- Sensedia's CEO Kleber Bacili 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 Construindo APIs Mobile

Page 1: Construindo APIs Mobile

Construindo APIsMobile

[email protected]: @kleberbacili

Page 2: Construindo APIs Mobile

Kleber Bacili

Page 3: Construindo APIs Mobile

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

Page 4: Construindo APIs Mobile

Alguns Clientes

Page 5: Construindo APIs Mobile
Page 6: Construindo APIs Mobile
Page 7: Construindo APIs Mobile
Page 8: Construindo APIs Mobile

They areGreat APPs!

Page 9: Construindo APIs Mobile

Supported by Great APIs

Page 10: Construindo APIs Mobile

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

Page 11: Construindo APIs Mobile

Super Buzz!

Page 12: Construindo APIs Mobile

Essencial, quando?

Page 13: Construindo APIs Mobile

App é Front-endMulti-plataformaMulti-canais (+)

Essencial, quando?

Page 14: Construindo APIs Mobile

INTERNET DAS COISAS

Page 15: Construindo APIs Mobile

App é Front-endMulti-plataformaMulti-canais Open (+)

Essencial, quando?

Page 16: Construindo APIs Mobile

KEEPCALM

AND

BUILDAPIs

Page 17: Construindo APIs Mobile

1 TECNOLOGIAS ADEQUADAS

2 DESIGN CUIDADOSO

3 CONTROLE & SEGURANÇA

5 ALCANCE AMPLIFICADO

4 ONBOADING FACILITADO

Atributos Valiosos para sua API

Page 18: Construindo APIs Mobile

Atributo #Tecnologias Adequadas

Page 19: Construindo APIs Mobile

RESTSOAP vs.

Page 20: Construindo APIs Mobile

POST /GetStock HTTP/1.1Host: www.example.orgContent-Type: applicaNon/soap+xml

<?xml version="1.0"?><soap:Envelope

xmlns:soap=”http://www.w3.org/2001/12/soap-envelope"

soap:encodingStyle=”http://www.w3.org/  2001/12/soap-encoding">

<soap:Bodyxmlns: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

Page 21: Construindo APIs Mobile

JSONXML vs.

Page 22: Construindo APIs Mobile

JSONXML vs.

{"symbol":  ”GOOGL",  "price": 94.72,

}

<?xml version="1.0"?>

<soap:Envelope

xmlns:soap="http://www.w3.org/2001/12/soap-envelope"

soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">

<soap:Bodyxmlns:m="http://www.example.org/stock"> <m:GetStockPriceResponse> <m:Price>94.72</m:Price>

</m:GetStockPriceResponse></soap:Body>

</soap:Envelope>

Prefira

JSONJavascript Object Notation

Page 23: Construindo APIs Mobile

Atributo #

Page 24: Construindo APIs Mobile

Use dojeito certo!

(1/2)

Page 25: Construindo APIs Mobile

(2/2)

Use dojeito certo!

Error Codes padronizados

Versionamento

Profundidade

Caching

Paginação

Compactação

Filters: Atributos na query string

Page 26: Construindo APIs Mobile

Atributo #

Page 27: Construindo APIs Mobile

ThrottlingProteja o seu Backend

Page 28: Construindo APIs Mobile

Log TracePerformanceDisponibilidade

Page 29: Construindo APIs Mobile

Identidade, Autorização e Privacidade

Identificar App (?)

Identificar Usuário (?)

Identificar Device (?)

Segurança no Canal (HTTPS?)

Page 30: Construindo APIs Mobile

Atributo #

Page 31: Construindo APIs Mobile

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

Page 32: Construindo APIs Mobile
Page 33: Construindo APIs Mobile
Page 34: Construindo APIs Mobile
Page 35: Construindo APIs Mobile
Page 36: Construindo APIs Mobile

Request a Key

Page 37: Construindo APIs Mobile

Experimentação Simplificada

Documentação Interativa

Ambiente de Sandbox

Page 38: Construindo APIs Mobile

Atributo #

Page 39: Construindo APIs Mobile

Onde seuPúblico está? Forum de discussão Blog para as novidades Eventos especializados

Page 40: Construindo APIs Mobile
Page 41: Construindo APIs Mobile

Hackathon

Page 42: Construindo APIs Mobile

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

Page 43: Construindo APIs Mobile

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

Page 44: Construindo APIs Mobile

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�

All�API�Calls� Blocked�Calls�

Melhoria Contínua

Para melhorar você precisa entender comoa sua API está sendo usada

Page 45: Construindo APIs Mobile

Que tal:

developers.[you].com

?

Page 46: Construindo APIs Mobile

1 TECNOLOGIAS ADEQUADAS

2 DESIGN CUIDADOSO

3 CONTROLE & SEGURANÇA

5 ALCANCE AMPLIFICADO

4 ONBOADING FACILITADO

Atributos Valiosos para sua API

Page 47: Construindo APIs Mobile

Construindo APIsMobile

[email protected]: @kleberbacili

Page 48: Construindo APIs Mobile

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