Exoskeleton is a faster and leaner Backbone for your HTML5 apps.
#backbone
WordCamp Saratoga
Through some lucky scheduling, I was able to attend both LevelUp Con and WordCamp Saratoga in a single trip. I spoke at WordCamp about how to build a quick Backbone.js application which used WordPress as the backend (interfacing via the REST API). I thought my talk went OK, although I didn’t love it to be honest, and in hindsight I kind of wish I’d dived a bit harder into some better examples of how Backbone works with Views and whatnot. Here are the slides I used:
And if you’re interested in the code, it’s all available via Github. I got a few nice bits of feedback as well, so that was good:
@beaulebens don't tell anyone, your talk @wctoga was my favorite, backbone / WP was what I needed & the react sideline, priceless #wctoga
— Leon Shelhamer (@francismhwhite1) October 14, 2014
Fun talk on backbone(.js) with @beaulebens @wctoga #wctoga #youllcatchafishsoon https://t.co/S6ZXvCV0w0
— Priscila Dias (@pmdias) October 11, 2014
Yes I've used a bunch of languages and framework but can always learn more, especially from @beaulebens #wctoga
— Mubs (@mubashariqbal) October 11, 2014
A pragmatic guide to Backbone.js apps
A pragmatic guide to Backbone.js apps
A ranty, opinionated series of easily digestible tidbits
The Future of WordPress: REST API + Javascript single-page app?
DISCLAIMER: These are my personal thoughts only, based on what I’m seeing around the web over the last few years.
Working on o2 for the last few months, and spending more and more time in amongst the Javascript community at events like jQueryConf, BackboneConf and dotJS, I’ve started thinking about the future of WordPress differently.
WordPress currently consists of a large, complex, PHP codebase, sitting on top of a MySQL backend. plugins are primarily PHP, with a light sprinkling on Javascript to mostly provide UI “candy”. Part of the reason for that is probably because:
- It’s pretty hard to interact with WordPress on any real depth using Javascript, and;
- If you’re trying to provide any custom functionality for WordPress, you pretty quickly end up doing it in PHP because that’s where all of the internal APIs and functionality resides.
That’s been a fine approach for the last 10 years, but I believe that things are changing, and we need to change with them to remain relevant. Full page reloads with heavy server-based everything is no longer really acceptable for a solid UX. With that in mind, here’s a possible future for WordPress, extrapolated out from where some things seem to be going (on the wider web, not necessarily currently within WordPress development):
WordPress core becomes 2 “separate” portions; one is a PHP-based REST-style API. Effectively, a layer that provides a structured API onto our database. That would cover all posts, users, settings, queries, meta data etc that lives within the WP DB. The other piece would be (ideally) a pure Javascript, single-page web application which fully implements the API to deliver what we currently know as wp-admin.
Plugins would create additional endpoints within the backend API, or would supplement existing ones (e.g. post/meta) with additional data and/or actions. They could also be implemented via pure JS, depending on what they were built to do. Themes could potentially be built using no PHP at all — making queries directly to the API via JS, and then using something like Mustache to template the output back to the user. This would have SEO ramifications, but we can always figure something out there, and search engines are constantly improving.
To get there would take a long time, and at many points it would no doubt break all sorts of plugins. This would be a huge shift and I think would actually be really hard to accomplish within the community, which makes me scared because I think it will be rejected as a direction (or at least slowed down a LOT) because of backwards compatibility at the very least. Perhaps we can maintain backwards compatibility for some plugins by at least making the new wp-admin a hybrid app, which leverages a JS-based approach for all truly core functionality/views, and then falls back to full page reloads for plugin-based admin functionality. Without a lot of work, that approach would still break for “integrated” plugins (where they inject settings into or manipulate existing admin pages), if we assume that all of those pages would become powered by/created via Javascript + API interactions.
Unfortunately a crucial point where backwards compatibility would be important would be the Post Editor, which is also where some big performance/UX improvements could potentially be seen by switching to a largely JS-powered UI.
I don’t know if this is really where WordPress will go, or if it is, exactly how it will get there. There’s a project currently to build a core REST API which I’m eagerly observing and will be trying to get more involved in. It has the potential to become the kernel of the future of WordPress if it’s done right. This is going to be a long road either way, so I’m excited for where we can all go from here.
Do you think WordPress can (or should) move in this direction?
backbone.keys
Backbone.keys brings the keyboard to your views. Keyboard shortcuts bound to Views super easily.
Nested Backbone Collections
nestCollection function makes it easy to nest collections in Backbone.js
wyuenho/backbone-pageable · GitHub
wyuenho/backbone-pageable · GitHub
A pageable, drop-in replacement for Backbone.Collection inspired by Backbone.Paginator
Backbone Forms
Form framework for BackboneJS with nested forms, editable lists and validation
Make Backbone Better With Extensions
Make Backbone Better With Extensions
A collection of nice Backbone extensions that provide additional functionality or structure to your BB projects.
TodoMVC
A project which offers the same Todo application implemented using MV* concepts in most of the popular JavaScript MV* frameworks of today.