Art of Building APIs
-
Upload
jakub-nesetril -
Category
Technology
-
view
970 -
download
1
description
Transcript of Art of Building APIs
![Page 1: Art of Building APIs](https://reader034.fdocuments.in/reader034/viewer/2022052307/54b393774a795935078b4571/html5/thumbnails/1.jpg)
founder & CEO of ApiaryJakub Nesetril
THE ART OF BUILDING APIS
![Page 2: Art of Building APIs](https://reader034.fdocuments.in/reader034/viewer/2022052307/54b393774a795935078b4571/html5/thumbnails/2.jpg)
ONE SIZE DOES NOT FIT ALLThere is no simple way to solve API design.
Different groups of developers has different needs, usecases and workflows.
![Page 3: Art of Building APIs](https://reader034.fdocuments.in/reader034/viewer/2022052307/54b393774a795935078b4571/html5/thumbnails/3.jpg)
ART, NOT ROUTINEAPI is and interface. In 2000’s, we thought it was machine-machine interface. But in 2010’s, we know that it’s the interface to the developer behind the machine. Thus, building APIs is a lot like building UIs.
![Page 4: Art of Building APIs](https://reader034.fdocuments.in/reader034/viewer/2022052307/54b393774a795935078b4571/html5/thumbnails/4.jpg)
UI design is dominated by user-centered design. It involves the user into design workflow as soon as possible, often using wireframes.
![Page 5: Art of Building APIs](https://reader034.fdocuments.in/reader034/viewer/2022052307/54b393774a795935078b4571/html5/thumbnails/5.jpg)
But API design is still largely a waterfall approach - design-build-document everything upfront. Only then involve the user.
![Page 6: Art of Building APIs](https://reader034.fdocuments.in/reader034/viewer/2022052307/54b393774a795935078b4571/html5/thumbnails/6.jpg)
apiary.io
Mock > Use > Implement
Using a mock server allows to change the workflow: produce a wireframe quickly, then involve the customer. Implement once the design is finalized.
![Page 7: Art of Building APIs](https://reader034.fdocuments.in/reader034/viewer/2022052307/54b393774a795935078b4571/html5/thumbnails/7.jpg)
apiary.io
Mock > Use > Implement
Using a mock server allows to change the workflow: produce a wireframe quickly, then involve the customer. Implement once the design is finalized.
![Page 8: Art of Building APIs](https://reader034.fdocuments.in/reader034/viewer/2022052307/54b393774a795935078b4571/html5/thumbnails/8.jpg)
HOST: http://api.twitter.com/ --- Twitter API 3.0 ------Welcome to our API. Comments support Markdown syntax---
-- Retrieve Tweets --GET /tweets> Accept: application/json< 200< Content-Type: application/json{ "items": [ { "url": "/feed", "range":"2ZY48XPZ", "quantity": 1, "name": "New socks", "price": 1.25 }] }
API BLUEPRINT
Apiary.io has a quick tool for describing APIs using a very light-weight DSL called API Blueprint.
![Page 9: Art of Building APIs](https://reader034.fdocuments.in/reader034/viewer/2022052307/54b393774a795935078b4571/html5/thumbnails/9.jpg)
apiary.io
Mock > Use > Implement
DocumentationTesting
Using this more structured approach gives you more benefits at once. Once you finish designing, your documentation and test suite are in sync.
![Page 10: Art of Building APIs](https://reader034.fdocuments.in/reader034/viewer/2022052307/54b393774a795935078b4571/html5/thumbnails/10.jpg)
TESLA MODEL SAmong other APIs that were documented in Apiary was Tesla Model S.
![Page 12: Art of Building APIs](https://reader034.fdocuments.in/reader034/viewer/2022052307/54b393774a795935078b4571/html5/thumbnails/12.jpg)
PHOTO CREDITS
http://www.flickr.com/photos/ironrodart/4308675209/sizes/o/http://www.flickr.com/photos/30030574@N03/3633431964/