Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7883043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:25:47+00:00 2026-06-03T04:25:47+00:00

I currently have a web app written in rails3 . I want to write

  • 0

I currently have a web app written in rails3. I want to write a backbone-based js app that will consume the rails3 services; while there are alot of examples of backbone with rails, I would prefer to build it in a different project. This project would be pure html+css+js, wich would then point to the other proj’s services.

  • What are the advantages or roadblocks of this approach?
  • Are there any other approaches?

I’ve noticed that most of the rails3-backbone projs on github do alot of the magic behind the scenes (ex: precompiling handlebar assets, auto-including js files), which makes it more difficult to understand how all the pieces work together. Also, if I want to package an app using phonegap/trigger.io/etc, wouldn’t this be more difficult?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T04:25:48+00:00Added an answer on June 3, 2026 at 4:25 am

    When it comes to writing Backbone application, it actually makes a lot of sense to develop it solely on its own. In other words, develop it, as you said, as a pure html+css+js application.

    There are very good reasons to do so:

    1. Deployment

      Consider when you are deploying your application. At some point you will surely want to deploy some modular component of your application. This maybe the backend services which are responsible for serving json to your clients, or it could be a tweak on the UI. Whichever it may be, it is best if you are able to deploy each of them independently.

    2. Modularity

      It may sound attractive to be able to use some rails magic behind the scenes to help develop your UI. However, consider the modularity of your project.

      IMO, Backbone (or any AJAX application) is beautiful. And the beauty comes from the very fact that the UI code really has nothing to do with the implementation of your backend. It could talk to a PHP/JAVA/RAILS/PYTHON/YOU-NAME-IT server, and it still wouldn’t matter. That is, if you’re implementing a RESTFUL server. In fact, the UI code could rest on an NGINX server that serves nothing but static content, and it would still run perfectly fine. This is actually what you want. Your UI code should at no point (during development or production) be aware of your backend’s framework or whatever tools your backend supports. It would be a crime to introduce unnecessary dependencies into your Backbone project.

      Imagine one day when you see fit to migrate to a different architecture which isn’t Rails. It would be a nightmare if there are any dependencies at all. Much rather have a UI that is totally independent of your backend implementation.

    3. Packaging

      You mentioned you’re going to use PhoneGap to package your application. This is probably the biggest reason why your project should be independent. You will not have the luxury of loading your js from your servers when you’re say, submitting your app to Apple, if you ever plan to do that. All scripts must be packaged into the App which must be standalone.

    Last but not least, to answer your question about suggestions for ‘other approaches’. That is quite vague, so I’m not sure if this suggestion would help, but I wanted to point you to some resources that would help organize your Backbone projects, and make your life easier.

    Backbone with RequireJS

    I would argue that this is the most wonderful way to work with Backbone. RequireJS let’s you specify your dependencies in your js files much like you would import in compiled languages, which helps a lot when it comes to organizing your Backbone project, and breaking the code down into smaller modules. The optimization tool that requireJS provides also let’s you compress all of your javascript file into a single file. I believe that will come in handy if you want to package your project in PhoneGap.

    Underscore

    You mentioned using HandleBar. However, I recommend that you look into underscore’s templating engine which is inspired by RoR’s templates. And assuming that you’re quite comfortable using Rails, the underscore templating engine might just be what you’re looking for.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web app that currently is inserting x (between 1 + 40)
I want to build a REST web service on app engine. Currently i have
I have recently inherited a J2EE Struts web app that was written back in
I have written a personal web app that uses charCodeAt() to convert text that
We have a desktop application written in Java Swing that currently uses Java Web
i have written a small codeigniter test app that is currently running on my
Currently i have a c sharp application (Client app). and a web application written
I currently have an app deployed on Heroku which runs on two web dynos
I currently have a web form aspx page that calls RegisterClientScriptBlock. This sends down
We have a web application that uses dropbox as file storage. We have currently

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.