I want to create a custom wordpress plugin. I want to use backbone.js. I have used backbone for non php/wordpress related projects. Can someone guide me to how to go about writing the plugin to make use of the mvc client side architecture? Thanks!
Leave a Reply
You must be logged in to post a comment.
I just pushed WordPressSinglePage, a starting place for building single-page JavaScript applications on top of Backbone.js via Brunch (Backbone.js, CoffeeScript, EcoTemplates, jQuery –http://brunch.io/) and the WordPress JSON api. This should get you on the right track.
Updated link:
https://github.com/damassi/WordpressSinglePage-JavaScript
My belief is that since backbone.js is a client side framework the bulk of the complexity is going to be in writing the actual plugin. Smashing Magazine has a great article “WordPress Essentials: How To Create A WordPress Plugin” that should serve as a good starting point. Outside of that I would look at the discussions about “Backbone.js How to use with PHP” here on StackOverflow.
“If you’re doing #PHP and need a RESTful API (for #BackboneJS, etc) the #SlimPHP framework looks pretty slick. It’s like #Sinatra for PHP.” Derik Bailey