{"id":166,"date":"2016-06-12T08:17:09","date_gmt":"2016-06-12T12:17:09","guid":{"rendered":"https:\/\/2016.nyc.wordcamp.org\/?post_type=wcb_session&#038;p=166"},"modified":"2016-07-12T07:54:22","modified_gmt":"2016-07-12T11:54:22","slug":"backbone-and-the-wordpress-rest-api","status":"publish","type":"wcb_session","link":"https:\/\/nyc.wordcamp.org\/2016\/session\/backbone-and-the-wordpress-rest-api\/","title":{"rendered":"Backbone and the WordPress REST API"},"content":{"rendered":"<p>Backbone works perfectly with the new WP REST API; lets dig in!<\/p>\n<p>Learn about connecting Backbone to the REST API building on its bundled JavaScript client, and extending the REST API with hooks.<\/p>\n<p>The WP REST API JavaScript library provides base Backbone models and collections for every endpoint: learn how to use and extend them with logic and views. We will also look at adding additional data to existing endpoints as well as creating custom endpoints for our application on both the front and back end.<\/p>\n<p>Learn about what is easy and what is not so easy when working with Backbone and the WP REST API.<\/p>\n<p>Overview<br \/>\nUsing the WP REST API with Backbone apps<br \/>\nExtending the REST API Backbone classes<br \/>\nUsing hooks to extend the REST API endpoints and create custom endpoints<br \/>\nPutting it together<br \/>\nBuild a demo extending the base objects and loading and saving data with the REST API<br \/>\nExtending Data returned from the API PHP side and using that data in Backbone<br \/>\nExtending Data stored on the API side and tying into Backbone<br \/>\nJavaScript debugging tips and tools<br \/>\nAuthentication, security and accessibility<br \/>\nSummary<br \/>\nThe easy parts: data binding, extending, connect WordPress data to Backbone models and views<br \/>\nThe hard parts: authentication, big apps, browsers<br \/>\nSome gotchas: no-js, a11y, i18n<br \/>\nSome help: workarounds, helpers and resources<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Backbone works perfectly with the new WP REST API; lets dig in! Learn about connecting Backbone to the REST API building on its bundled JavaScript client, and extending the REST API with hooks. The WP REST API JavaScript library provides base Backbone models and collections for every endpoint: learn how to use and extend them &hellip; <a href=\"https:\/\/nyc.wordcamp.org\/2016\/session\/backbone-and-the-wordpress-rest-api\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Backbone and the WordPress REST API&#8221;<\/span><\/a><\/p>\n","protected":false},"author":10464658,"featured_media":0,"template":"","meta":{"_crdt_document":"","jetpack_post_was_ever_published":false,"_wcpt_session_time":1468699800,"_wcpt_session_duration":3000,"_wcpt_session_type":"session","_wcpt_session_slides":"","_wcpt_session_video":"","_wcpt_speaker_id":[165],"footnotes":""},"session_track":[8858],"session_category":[],"class_list":["post-166","wcb_session","type-wcb_session","status-publish","hentry","wcb_track-developers"],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7kQYf-2G","session_date_time":{"date":"July 16, 2016","time":"4:10 pm"},"session_speakers":[{"id":"165","slug":"adam-silverstein","name":"Adam Silverstein","link":"https:\/\/nyc.wordcamp.org\/2016\/speaker\/adam-silverstein\/"}],"session_cats_rendered":null,"_links":{"self":[{"href":"https:\/\/nyc.wordcamp.org\/2016\/wp-json\/wp\/v2\/sessions\/166","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nyc.wordcamp.org\/2016\/wp-json\/wp\/v2\/sessions"}],"about":[{"href":"https:\/\/nyc.wordcamp.org\/2016\/wp-json\/wp\/v2\/types\/wcb_session"}],"version-history":[{"count":1,"href":"https:\/\/nyc.wordcamp.org\/2016\/wp-json\/wp\/v2\/sessions\/166\/revisions"}],"predecessor-version":[{"id":801,"href":"https:\/\/nyc.wordcamp.org\/2016\/wp-json\/wp\/v2\/sessions\/166\/revisions\/801"}],"speakers":[{"embeddable":true,"href":"https:\/\/nyc.wordcamp.org\/2016\/wp-json\/wp\/v2\/speakers\/165"}],"author":[{"embeddable":true,"href":"https:\/\/nyc.wordcamp.org\/2016\/wp-json\/wporg\/v1\/users\/adamsilverstein"}],"wp:attachment":[{"href":"https:\/\/nyc.wordcamp.org\/2016\/wp-json\/wp\/v2\/media?parent=166"}],"wp:term":[{"taxonomy":"wcb_track","embeddable":true,"href":"https:\/\/nyc.wordcamp.org\/2016\/wp-json\/wp\/v2\/session_track?post=166"},{"taxonomy":"wcb_session_category","embeddable":true,"href":"https:\/\/nyc.wordcamp.org\/2016\/wp-json\/wp\/v2\/session_category?post=166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}