I've got Backbone!

Originally posted on

… in a couple of my apps, at least. While I absolutely LOVE building “pure” Rails applications, I don’t think anybody in their right mind would ever discount the validity of using a client-side MV* JavaScript library to build a single-page web app or complicated user interface. I believe integrating libraries such as Backbone or Angular is not only beneficial from a user experience standpoint, but can serve to help maintain a more scalable architecture down the road (shots fired to all those detractors saying Ruby on Rails isn’t scalable). To that end, I’ve been focused on incorporating BackboneJS into two types of my applications: a single-page, simple flash card application, and a more robust application. One issue I’ve found is finding up-to-date tutorials on Backbone and Rails integration. With JavaScript MV* libraries being relatively new, there are constant versioned updates that sometimes break backwards compatibility. For example, RailsCasts has an episode dealing with backbone on rails, but some initialization functions are defunct which tripped me up somewhat. But, barring that issue, everything is going well! The flash card application overview is extremely simple: to create as much of a one-page application as possible. I’m planning out multiple flash cards that have questions and answers, all belonging to a set. Rails will be used primarily as an API for the whole app, existing pretty much only to help with data validation. There are plans to integrate a spaced repetition algorithm down the road, but for now I’m only interested in getting the MVP up. The other application is … undisclosed … at this point in time, but I’m interested in applying backbone principles to the user interface much like Fitocracy has done. They have a very slick interface that feels very snappy and responsive, and after looking under the hood it appears much of that is achieved with Backbone. Coming up on 11 weeks now, I’ve decided to attempt to increase my Github contributions. I’ve stuck to contributing at least once a day for the last 80 days, but if we’re being completely honest, a handful of those contributions were README amendments due to my not being in town. Time to refocus and make sure the contributions are meaningful, instead of just another light green square!

Comments? I'm @dstrunk on Twitter.