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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T06:24:51+00:00 2026-06-15T06:24:51+00:00

I am just getting started with Backbone and am confused on a point. I

  • 0

I am just getting started with Backbone and am confused on a point.

I have a page that displays a list of documents.

Clicking on a document in the list opens the full document for editing.

From what I understand, the proper way to model this list in Backbone is as a Collection of document Models.

var DocList = Backbone.Collection.extend({
  model: document
});

However the document Model will be large, with many properties. The list doesn’t need to display all of that information.

I am wondering if it is preferable to have something like the following…

var ShortDoc = Backbone.Model.extend({});
var shortDoc = new Doc({ 
  id: id,
  title: docTitle 
});
var DocList = Backbone.Collection.extend({
  model: shortDoc
});

…where shortDoc contains only the properties necessary for the purpose of generating a list.

Or is it preferable to use a Collection with the document Model in its entirety?

Thanks (in advance) for your help

  • 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-15T06:24:52+00:00Added an answer on June 15, 2026 at 6:24 am

    Keep in mind that you can write multiple Backbone.Views for the same model. While you might have a DetailView that presents the entire document, you’re also free to create an ItemView to showcase the important parts of each document as in a list view. While your DetailView will include a kitchen sink, the ItemView could be limited to showing off a title:

    var MyItemView = Backbone.View.extend({
      tagName: 'li',
      render: function () {
        this.$el.html('<h3>' + this.model.get('title') + '</h3>');
        return this;
      }
    });
    

    Finally, if it’s the volume of data that you’re concerned about: many Backbone applications opt to keep a collection for each type of model used in the application. Their state needs to be maintained somewhere; why not in a nice, organized list? You don’t need to bootstrap every model attribute when the application loads. You might instead opt to load a title (or whatever you need to render the initial list), and put off fetching the model until the user requests any details.

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

Sidebar

Related Questions

Just getting started with Backbone. I have a generic view that can render a
Just getting started with Obj-C and iOS programming. I have some code that loads
Just getting started with backbone.js, and one of the things I've noticed is that
I am just getting started with Backbone, and I have set up in a
I am just getting started couchdb and have been looking into writing couch apps.
I am just getting started with Backbone.js , but it looks really interesting... Right
I'm just getting started with Backbone and ran through a tutorial. I followed along
I'm just getting started with Visual Studio (2010 Beta) and have some basic questions
I'm just getting started with knockout.js. I have a foreach binding like this, which
I'm just getting started using Mustache and I have this rendering problem. I send

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.