Jakub Nešetřil: Jak (ne)dělat API

1,582 views

Published on

Zkušenosti z roční existence apiary.io.

Více na http://webexpo.cz/praha2012/prednaska/jak-nedelat-api/

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,582
On SlideShare
0
From Embeds
0
Number of Embeds
425
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Jakub Nešetřil: Jak (ne)dělat API

  1. 1. How (not) to write an API Jakub NešetřilWednesday, September 26, 12
  2. 2. apiary.ioWednesday, September 26, 12
  3. 3. API? apiary.io source: http://www.flickr.com/photos/21496790@N06/5065834411Wednesday, September 26, 12
  4. 4. API? apiary.io source: http://www.flickr.com/photos/daddo83/3406962115/Wednesday, September 26, 12
  5. 5. API? apiary.io source: http://www.flickr.com/photos/ecstaticist/3570660643/Wednesday, September 26, 12
  6. 6. RPC apiary.io source: http://www.flickr.com/photos/jasleen_kaur/5075553223Wednesday, September 26, 12
  7. 7. <?xml version="1.0"?> <methodCall> <methodName>examples.getUser</methodName> <params> <param> <value><i4>102</i4></value> </param> </params> </methodCall> <?xml version="1.0"?> <methodResponse> <params> <param> <value><string>John Doe</string></value> </param> </params> </methodResponse> apiary.ioWednesday, September 26, 12
  8. 8. SOAP apiary.io source: http://www.flickr.com/photos/jasleen_kaur/5075553223Wednesday, September 26, 12
  9. 9. POST /InStock HTTP/1.1 Host: www.example.org Content-Type: application/soap+xml; charset=utf-8 Content-Length: 299 SOAPAction: "http://www.w3.org/2003/05/soap-envelope" <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> <soap:Header> </soap:Header> <soap:Body> <m:GetUser xmlns:m="http://www.example.org/user"> <m:Name>John Doe</m:Name> </m:GetUser> </soap:Body> </soap:Envelope> apiary.ioWednesday, September 26, 12
  10. 10. REST apiary.io source: http://www.flickr.com/photos/tambako/6992962266/Wednesday, September 26, 12
  11. 11. GET /users/?name=John%20Doe HTTP/1.1 Content-Type: application/json; charset=utf-8 200 OK [{ name: { first: "John", last: "Doe" } }] apiary.ioWednesday, September 26, 12
  12. 12. POPULAR apiary.io source: http://www.flickr.com/photos/keithallison/6327068376Wednesday, September 26, 12
  13. 13. NO PROTOCOL apiary.io source: http://www.flickr.com/photos/24298372@N04/3370859327/Wednesday, September 26, 12
  14. 14. ORTHODOX BELIEVERS apiary.io source: http://www.flickr.com/photos/45818813@N05/4785640636/Wednesday, September 26, 12
  15. 15. PURITY WARS apiary.io source: http://www.flickr.com/photos/davidkingham/3661515844/Wednesday, September 26, 12
  16. 16. HOW TO WRITE AN API? apiary.io source: http://www.flickr.com/photos/21496790@N06/5065834411Wednesday, September 26, 12
  17. 17. EVERY API IS DIFFERENT apiary.io source: http://www.flickr.com/photos/marinacast/2255974192/Wednesday, September 26, 12
  18. 18. Latency? apiary.ioWednesday, September 26, 12
  19. 19. Mobile? Latency? apiary.ioWednesday, September 26, 12
  20. 20. s? Mobile? ox ie Pr Latency? apiary.ioWednesday, September 26, 12
  21. 21. s? Mobile? ox ie Pr Caching ? Latency? apiary.ioWednesday, September 26, 12
  22. 22. s? Mobile? ox ie Pr Caching ? Latency? Interactive? apiary.ioWednesday, September 26, 12
  23. 23. s? Mobile? ox ie Pr Caching ? Latency? Interactive? Data size? apiary.ioWednesday, September 26, 12
  24. 24. apiary.io source: http://www.flickr.com/photos/freeflyer09/7460144118Wednesday, September 26, 12
  25. 25. EXPERIMENT apiary.io source: http://www.flickr.com/photos/samipii/7590121284/Wednesday, September 26, 12
  26. 26. apiary.io source: http://www.flickr.com/photos/samipii/7590121284/Wednesday, September 26, 12
  27. 27. RESULTS apiary.io source: http://www.flickr.com/photos/eisenbahner/3697448759/Wednesday, September 26, 12
  28. 28. Mock > Use > Implement apiary.ioWednesday, September 26, 12
  29. 29. Mock > Use > Implement apiary.ioWednesday, September 26, 12
  30. 30. apiary.ioWednesday, September 26, 12
  31. 31. Mock > Use > Implement apiary.ioWednesday, September 26, 12
  32. 32. Documentation Automated Testing Mock > Use > Implement apiary.ioWednesday, September 26, 12
  33. 33. source: http://www.flickr.com/photos/lorenia/3464878271/Wednesday, September 26, 12
  34. 34. Q&A E-MAIL jakub@apiary.io TWITTER @apiaryioWednesday, September 26, 12

×