4

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!

2 Answers2

2

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

Community
  • 1
  • 1
cnp
  • 1,010
  • 2
  • 9
  • 20
1

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

Community
  • 1
  • 1
David Negron
  • 1,356
  • 2
  • 14
  • 23