09 Sep 2012, 21:46

Bharat Ruparel (146 posts)

Hello Derick, Thanks for your prompt response on the VIM question. I need some guidance in introducing backbone js for an existing Rails application on which I am the only developer.

Now, I hae far more experience with Ruby and Rails than Javascript/jQuery. But over the last year since I started to work on this project, I was forced to write a lot a jQuery code which works, but has grown to a bit of a mess! Now I am concerned about the maintenance and growth. That is my motivation in going to backbone.

Your first video is an excellent example of how to introduce backbone to replace existing jQuery code. But it raises more questions for me than the answers. I hope that you take some time in answering them.

  1. I have my jQuery code written in both Coffeescript and Javascript. Most of the Coffeescript code lives in the app/assets/javascripts folder where a file exists for each Rails controller. I have some reusable code in the lib/assets/javascripts directory as well. I had trouble getting some of my coffeescript code to run so I just wrote plain jQuery/Javascript code in the Rails Haml views files. How do I consolidate them using Backbone js?

  2. How do I prioritize my work? In other words, I don’t want to create pure client side apps instead of the Rails views since no one is asking for it yet. My motivation is to better organize my code for maintenance and future growth where I make the code more interactive.

I would appreciate any advice on this topic.



  You must be logged in to comment