API first approach for frontend developers

776 views
646 views

Published on

Роман Бугаев @rbugaev
«API first approach for frontend developers»
Frontend Dev Conf'14
www.fdconf.by

0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
776
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
12
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

API first approach for frontend developers

  1. 1. API first approach for frontend developers Roman Bugaev, API advocate @Adform BY
  2. 2. API - part of architecture • Internal APIs are APIs, Too - The same rules • Empower front-end • Front-end developer designs API (UI for data)
  3. 3. 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
  4. 4. API. Start from Spec/Mock
  5. 5. API. Start from Spec/Mock
  6. 6. API. Start from Spec/Mock
  7. 7. Collaborate https://github.com/apiaryio/apiblueprint-sdk
  8. 8. Agility/HAL • Amazon "_links": { "self": { "href": "/file/987" }, “root": { "href": "/folder/145", "title": “Root" } } https://github.com/mikekelly/backbone.hal http://weluse.github.io/hyperagent/
  9. 9. Agility/compatible > beautiful API Design @ GitHub (100 releases per day, in Adform only 25): http://tech.yandex.ru/events/yac/2013/talks/1100/
  10. 10. Performance/Conditional requests • ETag - Most responses return an ETag header • Last-Modified/ If-Modified-Since/ If-None-Match header parse: function(response, xhr) { if (xhr.status === 304) return this.models return response.data; }
  11. 11. Thank you! Questions? roman.bugaev@adform.com bugaev_roman http://linkedin.com/in/rbugaev

×