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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T08:12:47+00:00 2026-05-30T08:12:47+00:00

I have a question about the architecture of a backbone.js web app. Let’s say

  • 0

I have a question about the architecture of a backbone.js web app. Let’s say you are creating a movie collection webapp. You would use a Model for a movie and a Collection for your collection of movies.

The view for the collection is basically a load of li’s.

In order to make the webpages indexable by google you would allow it to work without javascript and get rendered on the server side. So that going to mydomain.com/12 would on the server side build up the html li elements for that collection.

If you then wanted to use backbone.js to modify the collection, you would need to load the data into backbone. What is the best way to do this? Two ways I can think of doing this is…

1) use jquery to iterate over the li elements reading the data into backbone – the problem with this is that the html probably only contains the movie names, and not the movie id’s /director information that might be needed in the backbone model. I suppose that data could be included in the html and hidden using css.

2)throw away everything in the list and reload it from the server using ajax – which to me seems like a waste since all the data could have been sent on the first page load.

Are either of these methods good practice? If not, how should it be done?

  • 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-05-30T08:12:48+00:00Added an answer on May 30, 2026 at 8:12 am

    Jeremy Ashkenas, author of Backbone, recommends that you print the model data as JSON in the page, and load it as an object:

    <script>
      Accounts.reset(<%= @accounts.to_json %>);
      Projects.reset(<%= @projects.to_json(:collaborators => true) %>);
    </script>
    

    See Backbone FAQ – Loading Bootstrapped Models.

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

Sidebar

Related Questions

I've got a question about an architecture af a complex GUI app. I'm creating
This is question about MVC web-app architecture, and how it can be extended to
My question is about software architecture in general. Let's consider an example: We have
I have a question about wiring web server controls. From many of the examples
I have some deep question about OOP architecture. What is a proper way to
i have a question about mod_rewrite. this is my static html site architecture created
I have a naive question about OOP design patterns. This is over-architecture, but I
I have a question about database architecture. We are building a CMS. There are
I have POSIX in mind for implementation, though this question is more about architecture.
I have a architecture question about legacy. For example I have a class that

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.