API Architecture Summit 2014- APIs: A Mobile Developers Perspective
API first approach for frontend developers
-
Upload
fdconf -
Category
Technology
-
view
392 -
download
2
description
Transcript of API first approach for frontend developers
API first approach for frontend developers
Roman Bugaev, API advocate @Adform BY
API - part of architecture
• Internal APIs are APIs, Too - The same rules
• Empower front-end
• Front-end developer designs API (UI for data)
Design/Pragmatic REST
• REST is an architectural style and not a strict standard
• #1 design principle: to maximize developer productivity
• Pragmatic REST is a design problem
• Keep simple things simple
API. Start from Spec/Mock
API. Start from Spec/Mock
API. Start from Spec/Mock
Collaborate
https://github.com/apiaryio/apiblueprint-sdk
Agility/HAL
• Amazon
"_links": {
"self": { "href": "/file/987" },
“root": { "href": "/folder/145", "title": “Root" }
}
https://github.com/mikekelly/backbone.halhttp://weluse.github.io/hyperagent/
Agility/compatible > beautiful
API Design @ GitHub (100 releases per day, in Adform only 25): http://tech.yandex.ru/events/yac/2013/talks/1100/
Performance/Conditional requests
• ETag - Most responses return an ETag header
• Last-Modified/ If-Modified-Since/ If-None-Matchheader
parse: function(response, xhr) {
if (xhr.status === 304)
return this.models
return response.data;
}