COPYRIGHT TEMBOO 2013
Managing API Complexity
!  Matthew Flaming
!  Director of SW Development at Temboo.com
!  Live in Mo...
COPYRIGHT TEMBOO 2013
My Terrible Secret
!  I hate APIs
!  (except for yours)
COPYRIGHT TEMBOO 2013
One API is Great
COPYRIGHT TEMBOO 2013
Many APIs, not so much
COPYRIGHT TEMBOO 2013
Where are all the apps?
!  9,970 APIs as of this morning
• programmableweb.com/apis/directory
!  The...
COPYRIGHT TEMBOO 2013
Two Problems
!  How do I connect to this API?
!  How do I make sure my app keeps working?
COPYRIGHT TEMBOO 2013
New learning curve per API
!  How does this API conceptually fit together?
!  How does this API hand...
COPYRIGHT TEMBOO 2013
More fragility per API
!  How to track API updates?
!  How to test API integration points?
!  How to...
COPYRIGHT TEMBOO 2013
This is an API publisher problem too
!  If you build it, they won’t (necessarily) come
!  …and if th...
COPYRIGHT TEMBOO 2013
How can API publishers help?
!  Thinking different isn’t always a good thing
• REST is (usually) bes...
COPYRIGHT TEMBOO 2013
How can API publishers help?
!  Understand that an API is a social contract
• “It should keep workin...
COPYRIGHT TEMBOO 2013
How can API publishers help?
!  Discoverability is your most important feature
• Documentation
• WSD...
COPYRIGHT TEMBOO 2013
How can API publishers help?
!  Benefits of client libraries
• Enforce API consistency
• Provide a t...
COPYRIGHT TEMBOO 2013
Code generation is the answer
Expose language-agnostic metadata
	

github.com/wornik/swagger-codegen...
COPYRIGHT TEMBOO 2013
Code generation is the answer
Use metadata to generate client libraries
	

www.stringtemplate.org	

...
COPYRIGHT TEMBOO 2013
How can API publishers help?
!  Make your APIs device-friendly
• Worry about data size
• Provide alt...
COPYRIGHT TEMBOO 2013
What about API consumers?
!  That’s all great, but…
COPYRIGHT TEMBOO 2013
What about API consumers?
!  Keep API integrations abstract and modular
!  Generalized open-source l...
COPYRIGHT TEMBOO 2013
Temboo
!  Collects and normalizes APIs to give you one
consistent interface (“Choreographies”)
!  Al...
COPYRIGHT TEMBOO 2013
Temboo
COPYRIGHT TEMBOO 2013
Temboo
COPYRIGHT TEMBOO 2013
Temboo
COPYRIGHT TEMBOO 2013
Temboo
COPYRIGHT TEMBOO 2013
Temboo
COPYRIGHT TEMBOO 2013
Temboo
COPYRIGHT TEMBOO 2013
Temboo
COPYRIGHT TEMBOO 2013
Temboo
COPYRIGHT TEMBOO 2013
Temboo
COPYRIGHT TEMBOO 2013
Temboo
!  Search Twitter (PHP)
$session = new Temboo_Session('matthew', ’myApp', ’demo');!
!
// Inst...
COPYRIGHT TEMBOO 2013
Temboo
!  Search Flickr (PHP)
$session = new Temboo_Session('matthew', ’myApp', ’demo');!
!
// Insta...
COPYRIGHT TEMBOO 2013
Temboo
!  Search Dropbox (PHP)
$session = new Temboo_Session('matthew', ’myApp', ’demo');!
!
// Inst...
COPYRIGHT TEMBOO 2013
Temboo
!  Search Dropbox (PHP)
$session = new Temboo_Session('matthew', ’myApp', ’demo');!
!
// Inst...
COPYRIGHT TEMBOO 2013
Temboo
!  Search Foursquare (PHP)
$session = new Temboo_Session('matthew', ’myApp', ’demo');!
!
// I...
COPYRIGHT TEMBOO 2013
Temboo
Choreography
Metadata
PHP template Node.js template Ruby template
iOS template Python templat...
COPYRIGHT TEMBOO 2013
Temboo
Choreography
Metadata
PHP template Node.js template Ruby template
iOS template Python templat...
COPYRIGHT TEMBOO 2013
Automation will transform APIs
!  Code generation + frameworks
!  Increasing standardization
!  Decr...
COPYRIGHT TEMBOO 2013
Thanks!
matthew.flaming@temboo.com
@mflaming
@temboo
"Managing API Complexity". Matthew Flaming, Temboo
Upcoming SlideShare
Loading in …5
×

"Managing API Complexity". Matthew Flaming, Temboo

2,817 views

Published on

APIs are proliferating on the web, providing app developers with ready access to a wide range of data and services, yet very few apps take advantage of more than one or two API providers. Arbitrary inconsistencies between APIs -- from authentication to input/output formats to details as small as timestamps or pagination -- mean every new API brings its own unnecessarily redundent learning curve, draining developer's most precious resource: time.

Temboo is part of an emerging class of services for managing and scaling API usage. By NORMALIZING access to APIs (as well as their associated documentation and credentials) these services do for development what PaaS and server virtualization have already done for app deployment and infrastructure. "Code virtualization", whereby all the tedious details of API access are abstracted away in standardized cloud-based processes, will free developers to spend their time writing only the code that actually makes their app unique. And that means more unique apps for everyone.

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

No Downloads
Views
Total views
2,817
On SlideShare
0
From Embeds
0
Number of Embeds
1,848
Actions
Shares
0
Downloads
22
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

"Managing API Complexity". Matthew Flaming, Temboo

  1. 1. COPYRIGHT TEMBOO 2013 Managing API Complexity !  Matthew Flaming !  Director of SW Development at Temboo.com !  Live in Moscow (thanks, YaC!)
  2. 2. COPYRIGHT TEMBOO 2013 My Terrible Secret !  I hate APIs !  (except for yours)
  3. 3. COPYRIGHT TEMBOO 2013 One API is Great
  4. 4. COPYRIGHT TEMBOO 2013 Many APIs, not so much
  5. 5. COPYRIGHT TEMBOO 2013 Where are all the apps? !  9,970 APIs as of this morning • programmableweb.com/apis/directory !  There’s an explosion of amazing APIs on the web right now, but... !  Most apps only connect to a single API (or a handful of similar APIs)
  6. 6. COPYRIGHT TEMBOO 2013 Two Problems !  How do I connect to this API? !  How do I make sure my app keeps working?
  7. 7. COPYRIGHT TEMBOO 2013 New learning curve per API !  How does this API conceptually fit together? !  How does this API handle the details? • Calling methods? • Data formats? (JSON or XML?) • Authentication? • Language support? • Dates? Boolean values? Pagination? • Etc. etc.
  8. 8. COPYRIGHT TEMBOO 2013 More fragility per API !  How to track API updates? !  How to test API integration points? !  How to effectively migrate between APIs?
  9. 9. COPYRIGHT TEMBOO 2013 This is an API publisher problem too !  If you build it, they won’t (necessarily) come !  …and if they do, they might hate you for it
  10. 10. COPYRIGHT TEMBOO 2013 How can API publishers help? !  Thinking different isn’t always a good thing • REST is (usually) best • Oauth 2.0 or HTTP Basic authentication • Support both JSON and XML • Keep your implementation details private
  11. 11. COPYRIGHT TEMBOO 2013 How can API publishers help? !  Understand that an API is a social contract • “It should keep working” • Minimize churn • Announce changes early, and loudly • Bake in versioning /myapi/v1.0/myresource
  12. 12. COPYRIGHT TEMBOO 2013 How can API publishers help? !  Discoverability is your most important feature • Documentation • WSDL… or not • JSON Discovery www.googleapis.com/discovery/v1/apis • Client libraries
  13. 13. COPYRIGHT TEMBOO 2013 How can API publishers help? !  Benefits of client libraries • Enforce API consistency • Provide a test harness • Reduce user friction • Help you think like an API consumer
  14. 14. COPYRIGHT TEMBOO 2013 Code generation is the answer Expose language-agnostic metadata github.com/wornik/swagger-codegen var findById = {! 'spec': {! "description" : ”Find pet by ID",! "path" : "/pet.{format}/{petId}",! "summary" : "Find pet by ID",! "method": "GET",! "params" : [swagger.pathParam("petId", "ID of pet", "string")],! "responseClass" : "Pet",! "nickname" : "getPetById"! },! 'action': function (req,res) {! …function body here…! }! };!
  15. 15. COPYRIGHT TEMBOO 2013 Code generation is the answer Use metadata to generate client libraries www.stringtemplate.org /*! $description$! */! var $nickname$ = function(! $params.fields:{paramName)$};separator=", "$,! callback, errorCallback) { ! ! var options = { ! !method: $method$, ! !hostname: $host$, ! !path: getReqPath($path$, $params$), ! }; ! var request = http.request(options, ! !function(response) { ! !responseHandler(response, callback,errorCallback); ! });! }!
  16. 16. COPYRIGHT TEMBOO 2013 How can API publishers help? !  Make your APIs device-friendly • Worry about data size • Provide alternatives to Oauth
  17. 17. COPYRIGHT TEMBOO 2013 What about API consumers? !  That’s all great, but…
  18. 18. COPYRIGHT TEMBOO 2013 What about API consumers? !  Keep API integrations abstract and modular !  Generalized open-source libraries !  API management platforms • We all love infrastructure virtualization… • What about… code virtualization?
  19. 19. COPYRIGHT TEMBOO 2013 Temboo !  Collects and normalizes APIs to give you one consistent interface (“Choreographies”) !  All the power of multiple APIs !  Just one learning curve
  20. 20. COPYRIGHT TEMBOO 2013 Temboo
  21. 21. COPYRIGHT TEMBOO 2013 Temboo
  22. 22. COPYRIGHT TEMBOO 2013 Temboo
  23. 23. COPYRIGHT TEMBOO 2013 Temboo
  24. 24. COPYRIGHT TEMBOO 2013 Temboo
  25. 25. COPYRIGHT TEMBOO 2013 Temboo
  26. 26. COPYRIGHT TEMBOO 2013 Temboo
  27. 27. COPYRIGHT TEMBOO 2013 Temboo
  28. 28. COPYRIGHT TEMBOO 2013 Temboo
  29. 29. COPYRIGHT TEMBOO 2013 Temboo !  Search Twitter (PHP) $session = new Temboo_Session('matthew', ’myApp', ’demo');! ! // Instantiate the Choreo! $choreo = new Twitter_Search_Tweets($session);! ! // Get an input object for the Choreo and set credential! $inputs = $choreo ->newInputs();! $inputs->setCredential('TwitterOAuthCredential');! ! // Set inputs! $inputs->setQuery("Yac2013");! ! // Execute Choreo and get results! $results = $choreo->execute($inputs)->getResults();!
  30. 30. COPYRIGHT TEMBOO 2013 Temboo !  Search Flickr (PHP) $session = new Temboo_Session('matthew', ’myApp', ’demo');! ! // Instantiate the Choreo! $choreo = new Flickr_Photos_SearchPhotos($session);! ! // Get an input object for the Choreo and set credential! $inputs = $choreo ->newInputs();! $inputs->setCredential(’FlickrOAuthCredential');! ! // Set inputs! $inputs->setText("Yac2013");! ! // Execute Choreo and get results! $results = $choreo->execute($inputs)->getResults();!
  31. 31. COPYRIGHT TEMBOO 2013 Temboo !  Search Dropbox (PHP) $session = new Temboo_Session('matthew', ’myApp', ’demo');! ! // Instantiate the Choreo! $choreo = new Dropbox_FilesAndMetadata_SearchFilesAndFolders($session);! ! // Get an input object for the Choreo and set credential! $inputs = $choreo ->newInputs();! $inputs->setCredential(’DropboxOAuthCredential');! ! // Set inputs! $inputs->setQuery("Yac2013");! ! // Execute Choreo and get results! $results = $choreo->execute($inputs)->getResults();!
  32. 32. COPYRIGHT TEMBOO 2013 Temboo !  Search Dropbox (PHP) $session = new Temboo_Session('matthew', ’myApp', ’demo');! ! // Instantiate the Choreo! $choreo = new Dropbox_FilesAndMetadata_SearchFilesAndFolders($session);! ! // Get an input object for the Choreo and set credential! $inputs = $choreo ->newInputs();! $inputs->setCredential(’DropboxOAuthCredential');! ! // Set inputs! $inputs->setQuery("Yac2013");! ! // Execute Choreo and get results! $results = $choreo->execute($inputs)->getResults();!
  33. 33. COPYRIGHT TEMBOO 2013 Temboo !  Search Foursquare (PHP) $session = new Temboo_Session('matthew', ’myApp', ’demo');! ! // Instantiate the Choreo! $choreo = new Foursquare_Venues_SearchVenues($session);! ! // Get an input object for the Choreo and set credential! $inputs = $choreo ->newInputs();! $inputs->setCredential(’FoursquareOAuthCredential');! ! $inputs->setLatitude("40.7186300");! $inputs->setLongitude("-74.055840");! ! // Execute Choreo and get results! $results = $choreo->execute($inputs)->getResults();!
  34. 34. COPYRIGHT TEMBOO 2013 Temboo Choreography Metadata PHP template Node.js template Ruby template iOS template Python template Java template cURL template Arduino template
  35. 35. COPYRIGHT TEMBOO 2013 Temboo Choreography Metadata PHP template Node.js template Ruby template iOS template Python template Java template cURL template Arduino template Patch
  36. 36. COPYRIGHT TEMBOO 2013 Automation will transform APIs !  Code generation + frameworks !  Increasing standardization !  Decreasing friction !  An exciting time to be a developer
  37. 37. COPYRIGHT TEMBOO 2013 Thanks! matthew.flaming@temboo.com @mflaming @temboo

×