Upgrade to Pro — share decks privately, control downloads, hide ads and more …

An introduction of the Backbone.js

An introduction of the Backbone.js

Introduction of the Backbone.js for a private meeting in my company.

shigeru. nakajima

May 13, 2016
Tweet

More Decks by shigeru. nakajima

Other Decks in Technology

Transcript

  1. ಛ௃ 1 ރΕ͍ͯΔ • 2010೥ੜ·Ε • ࡞ऀ • Jeremy Ashkenas

    • CoffeeScriptͱUnderscore.jsͷ࡞ऀ • ͜ͷઌɺେ͖ͳมߋ͕ͳ͍ • ϓϥάΠϯ͕ॆ࣮
  2. ಛ௃ 2 ໾ׂ෼୲͕໌֬ • ViewͱModelʹ෼͚Δ • View • Πϕϯτϋϯυϥʔͷએݴ •

    DOMͷੜ੒ • Model • σʔλͷอ࣋ • RESTfulAPIͱͷ௨৴
  3. ಛ௃ 3 RESTful APIΛ࢖͍΍͍͢ • RESTful API਌࿨ੑ • ModelʹAPIͷurlΛઃఆ •

    ModelͷfetchϝιουͰऔಘ • saveϝιουͰอଘ • CREATEͱUPDATEΛࣗಈ൑ผ
  4. دΓಓ 2 REST • REST (Representational State Transfer) • HTTPϝιουͱURLͰCRUDΛදݱ

    • Create : POST /users • Read : GET /users ɾ GET /users/:id • Update : PUT /users/:id • Delete : Delete /users/:id
  5. دΓಓ 3 RESTͱσʔλϕʔεૢ࡞ • URLͱσʔλϕʔεૢ࡞͕ରԠ • Create : POST /users

    : INSERT • Read : GET /users : SELECT • Update : PUT /users/:id : UPDATE • Delete : Delete /users/:id : DELETE
  6. دΓಓ 4 RESTful API • REST ͳ URL ͷ API

    • Ϩεϙϯε͕JSONܗࣜ • JavaScriptϓϩάϥϛϯάͰѻ͍΍͍͢ • Html͸ѻ͍ʹ͍͘
  7. ࢀߟࢿྉ • backbonejs.org • ࠷৽API͕Θ͔Δ • Backbone.jsೖ໳ (શ22ճ) - ϓϩάϥϛϯ

    άͳΒυοτΠϯετʔϧ • ϓϩάϥϛϯάͷखॱ͕Θ͔Δ • ೖ໳Backbone.js • શମ૾͕͔ͭΊΔ