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 8419625
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:39:59+00:00 2026-06-10T02:39:59+00:00

Rails has a means to update its presentation layer via js files and js.erb

  • 0

Rails has a means to update its presentation layer via js files and js.erb files, what are some of the specific benefits of using a framework like Backbone.js?

  • 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-10T02:40:00+00:00Added an answer on June 10, 2026 at 2:40 am

    Here are a couple reasons:

    1) Backbone was built specifically with Rails in mind, and integrates easily with the help of backbone-on-rails. While the Model-View-View Model (MVVM) patterns of Knockout and Angular could easily be incorporated into a Rails app rather unobtrusively, Backbone’s MVC architecture provides a level of organization that really seems necessary if your app has a lot of asynchronous page updates. Take this Stack Overflow page for a quick example:

    If you were building this question view in Rails, you’d have your question show.html.erb, question_show.js, show.js.erb, and all other js.erb files that pertain to asynchronously updating the content on this page (actions such as up/down-voting, favoriting, commenting, etc.).

    In Backbone, a view is not a markup template like show.html.erb, instead, it contains all relevant code to that markup resource in one spot. So, instead of defining all your event listeners in a remote, question_show.js file and handling all your AJAX updates in various js.erb files, all event listening and publishing relevant to the questions show resource is contained in one place, the Backbone question show view. Granted, comment could have its own view and comments their own collection, as well as other MVC elements I’m not mentioning. But point being, Backbone helps you define front-end resources.

    2) Choosing a JavaScript framework like Backbone helps take some of the load off your server for code that really doesn’t need to be executed server-side. Why render all your markup elements in html.erb templates on the server when it could be done in the client’s browser. In response to questions of security, you have the ability to whitelist/blacklist database object attributes when formatting your database object as JSON and shipping it to the client.

    3) Backbone (specifically) seems to give a good amount of freedom. It provides a set of conventions to help organize your application, but at the end of the day it’s your framework you’re developing. The MVC framework of Backbone is less one-way than Rails, yet the solid conventions persist.

    4) With Backbone (not speaking for or against other frameworks), pushState is easily implemented into a framework that expects its use cases. However, pushState has its downsides in terms of crawlers accessing your content, and requires some server-side rendering to be incorporated in a crawler-friendly way. What’s great though, is that you can attain the same history/degradability in using Backbone out-of-box; their url fragments allow for the same functionality, they just have an extra # in there.

    There are plenty of other reasons to use a framework like Backbone, and it really seems like there are a lot of alternatives because one framework does not fit all. But for what I can attest to, Backbone seems to be a great framework if you’re building an app from scratch. And it also seems very doable if you want to incorporate it into an existing application.

    Source: Backbone.js on Rails

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

Sidebar

Related Questions

Ruby on Rails has a screencast presentation they use to promote their framework that
My Rails app has some pages which are SSL-required and others which are SSL-optional.
For some reason, my project has messed up and now its throwing errors every
I have a Rails 3 gem which has some rake tasks that should only
I'm using Capybara through Cucumber to test a Rails app. The Rails app has
I'm using Prototype in my Rails project to do in-place editing (via Ajax.InPlaceEditor) of
I need to store app specific configuration in rails. But it has to be:
Rails has a nice idiom that makes it easy for you to have a
Rails has no way of creating foreign keys in migrations (there are plugins to
Rails has the rest autho plugin which works well but is there a solution

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.