Backbone and the WordPress REST API

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 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.

Learn about what is easy and what is not so easy when working with Backbone and the WP REST API.

Overview
Using the WP REST API with Backbone apps
Extending the REST API Backbone classes
Using hooks to extend the REST API endpoints and create custom endpoints
Putting it together
Build a demo extending the base objects and loading and saving data with the REST API
Extending Data returned from the API PHP side and using that data in Backbone
Extending Data stored on the API side and tying into Backbone
JavaScript debugging tips and tools
Authentication, security and accessibility
Summary
The easy parts: data binding, extending, connect WordPress data to Backbone models and views
The hard parts: authentication, big apps, browsers
Some gotchas: no-js, a11y, i18n
Some help: workarounds, helpers and resources

Speaker

WordCamp NYC is over. Check out the next edition!