 Backbone is awesome. Backbone is used for some of the apps that you use in your day-to-day life, like Basecamp, Hulu, Airbnb. Big web applications use Backbone as their underlying JavaScript technology. And that's something that can give you confidence that it's going to be scalable. It's going to be around for a while. It's also something that you know is going to create an awesome experience because you've used it already. It's pretty easy to get started with Backbone. It's pretty easy to explain the fundamental concepts. It's a very simple, basic library, and I'm going to explain to you those simple concepts right now. Models are the fundamental data containers for your, you can think of it like a row in your database table. It holds the data about a specific item, like a post, and it fires events when data changes. Collections are a way of grouping your models together and filtering, aggregating them, sorting them, whatever you need to do with a group of models. You can think of it like a bunch of rows in your database. Views are like a chunk of your interface. They deal with what goes on the browser, and also they take events back from the browser. That's fundamentally what they do. They're connected to templates. Templates are HTML bits, bits of HTML that have data placeholders in them. The data from your models gets put into those templates and rendered into the browser. Routes handle the URL of the browser and connect it to a state of your application. Let's you create a bookmarkable, shareable link that takes you right to somewhere inside an application. And the history is sort of the global router that Backbone uses to help you manipulate that URL structure. There's a little bit more to it. There's a couple other things in there, but really those are the fundamental parts of Backbone. And with those basic components, you can build out everything from a simple widget to a full page application to a giant massive web application that millions of people use. Backbone, like I said, is very simple. It's very small. It just has these basic components. The philosophy of the Backbone is to just provide the minimal set of features that you need to create a web application. It's a 7K library compressed, so it's really tiny and it doesn't really do a whole lot out of the box. And you'll find that if you start using it, which I hope you will, that you will need to build on top of it. That's how it's designed. Backbone is making WordPress magical. It's what we're using in WordPress Core to create some of the nicest experiences that we have right now. Things like the media system, the grid, the media grid. We use it in revisions, in the new theme browser, in the customizer we're using it. So these kinds of experiences where you're interacting, things are happening seemingly immediately. It's very responsive kind of interface that you're using in WordPress. Those are being created in Backbone. So learning to use Backbone is gonna help you work better in WordPress as a developer. And it's great for themes and plugins. It's already included in WordPress. So if you're creating a theme or a plugin and you wanna have some element on your page that's interactive, a widget that provides immediate feedback, loads quickly, look at Backbone as a way to do that. You can just take the small parts of Backbone that you need, you don't have to even use. For example, you can take just the models, the view and a template and create a rendered element on your page that updates automatically when the data changes. So you can use it in a very modular way and it's there for you already. So the nice thing about using Backbone when you're building on top of WordPress is you're building on top of WordPress. You've already got all the things that you love about WordPress. You've got the backend, you've got the extensibility, everyone knows how to use WordPress already and what you're gonna do with Backbone is you're gonna build something into it that's gonna create an awesome experience for people whether it's on the front end like a widget or a theme or maybe a feature on the backend like something in the admin panel that you want people to be able to interact with and have it be very responsive for them. You also benefit from WordPress' security model, the extensibility that we have with all the plugins and so forth. Those things are all still present when you build on top of WordPress with Backbone. So you're benefiting from all this stuff. Basically WordPress is gonna act as your data container and it's gonna serve up your data, it's gonna be where you send your data to and so you're building on something you already know is awesome. And WordPress bundles Backbone. I said that before, it's not a small point. What this means is you can just enqueue Backbone, it also means that you can count on the version of Backbone that's bundled with WordPress to be compatible with WordPress itself. Also if other plugins are using WordPress, you don't have to worry about like conflicting versions. So it turns out that's a really nice thing. And we have the REST API coming to WordPress. So the REST API is gonna let you send data in with JSON and get data back out with JSON. And that is exactly what Backbone wants. Backbone communicates in JSON. So when you're loading information from the server, what Backbone wants is JSON data and that's exactly what the REST API is gonna provide. So you can install the plugin now or when 4.5 comes out, we will have these endpoints in WordPress that basically give you all the data that you would need, your posts, your users, your media, your revisions, anything you can get right now out of WordPress, you'd be able to get out with the REST API. One final point about JavaScript applications in general, they can help you save server resources. So for example, if you have a widget on your site that provides geo-located information that's unique to users in each area of the country or the world, by putting that into a JavaScript application that lazy loads and gets its data with an Ajax request, you can then provide full-page caching for your site. You're not differentiating on the server between different users. Another thing that's really nice about JavaScript applications is it's really easy to cache the information in the user's browser. So as they navigate from page to page, if you already have that geo-located information, it's right there for you. If you're building something like a full-page app and they're navigating from page to page, you're only loading what has changed. You're only loading like the new content of the page. You don't have to reload the headers, all the scripts, all the other images. You're just loading what needs to change. So a lot of potential to actually offload some of the work that your server might have to do up into the cloud, up into the browsers, essentially, that are visiting your site. All right, I'm gonna talk just briefly about the REST API, which is usable today. You can download the plugin. It's getting a lot of development effort right now. And it's gonna provide JSON endpoints to read and write everything, maybe not everything, but if it doesn't provide the endpoint that you need, it's really easy to add your own. And it's gonna let you do all the things that you would expect to be able to do in WordPress, but with this JSON connection, sending and receiving data from the server. Also, with the REST API, the security and privileges that you have in WordPress work as you expect them to. So on the front end, you're only gonna be able to see information that a normal visitor to your site would be able to see. If you're gonna try to make changes, like update a post or change a user's password, some kind of event you need admin privileges for, you need those privileges. If it's just creating a post and you need to be an editor, the same privileges will apply. So it's gonna work kind of as you would expect it to work. And now it's happening all over this JSON connection. There is a client library that's a backbone library that's provided with the REST API. It's just all you have to do to use it is add WP-API as a script dependency of your script. And this library provides models and collections that represent all of the endpoints. So there's a model for users, there's a model for posts, and there's a model for, you know, for every point that you have, basically in WordPress, you can just build on top of those. You can build your views on top of that. You can extend them to do whatever you need to do. Those base objects, like I said, are extendable. So the idea, again, just like with Backbone, is that it's gonna just provide the minimal amount that, you know, a normal system would use, just like WordPress out of the box kind of, and then you add what you need onto that. One minute. All right. The REST API has extensive hooks so that everything that you send to the server can be adjusted. Let's say you wanna add some additional information, like a featured image that's not provided by default when you're getting post. You can add that using a hook, just like everywhere else in WordPress, extensive hook system to allow you to make it your own. All right, this is my final slide. Go forth in Backbone. This is what my goal of this talk is. Get you guys interested in Backbone. There's a ton of resources out there. I've got a page on my website, tunedin.net slash backbone. I created a whole list of things that'll get you started. Now you can use it in your theme or plugin, consider it an opportunity to just kind of explore what you can do with Backbone. If you're getting interested in JavaScript, it's a great way to build even just a simple element. You don't really need much. It's a tiny library, you load it up, and you'll have some basic features that are gonna help you organize your code. And organizing your code is one thing that's really nice about Backbone. It helps separate out where you're doing things in your code. It's got, like I said, the views, the models, the collections. That's gonna sort of push you into a certain form of organization. When you get into a larger application, you may need to think about separating those out into files and folders and so forth. All right, couple gotchas, I'm almost at the end. Don't forget about people who don't use JavaScript. Backbone's a JavaScript library. If you don't have JavaScript, it's not gonna work for you. So you need to think about your users. There are people who don't have JavaScript enabled for certain reasons. At least provide a message that tells them you need JavaScript enabled to use this site. Maybe if you're providing a more important feature, you wanna provide some kind of PHP rendering as a fallback. Accessibility is important. When you have things changing on the screen and they're changing dynamically, things are happening in the browser. Screen readers that blind or other people use will not work correctly. They do not understand this. We have a great function in WordPress, WPSpeak. It allows you to announce events to the user through their screen reader. So when something comes back from the server, you can tell them this event has just happened. And finally, there's a zillion resources out there. I mentioned on my site that I have a page for you, so go check that out. And go check out Backbone. Thank you.