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

  • Home
  • SEARCH
  • 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 9210293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:02:25+00:00 2026-06-18T01:02:25+00:00

I am trying to be as lazy loading as possible, But, I am puzzle

  • 0

I am trying to be as lazy loading as possible,

But, I am puzzle on how to start, here is my “sequenced comprehension”:

Objective: Create a contacts page with contacts existing on the server

  • Step1.0: To use the router: the <div id="contacts"> must exists to trigger a rule, so I stepped back to (Step0.9),
  • Step0.9: Created this div in the body. Fine, the router find the #contacts, Oh, but this is a view, ok, stepped back to (Step0.8).
  • Step0.8: Erase the div created in the body and replace it by a view instead:
contactsView = Backbone.View.extend 
tagName: 'div',
id: 'contacts'

To be lazy loading, this view should only be created when the #contact is trigger in my router table, but I just removed it from by body, it does exist anymore, I am back to Step1.0 ???

Some tutorials found, shows global variable settings… Please, how the general scenario using a router, a view, their models, and collection should proceed (no code is necessary for an answer, just one line for each steps) ?

I know there can be multiples ways, but what is the most common backbone step strategy to create elements.

Thanks in advance.

  • 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-18T01:02:27+00:00Added an answer on June 18, 2026 at 1:02 am

    I’m not 100% sure I understood you correctly. If I didn’t please let me know in the comments.

    There seems to be some confusion in your question regarding the usage of Backbone.Router in general. When the router maps a route to URL fragment #contacts, that has nothing to do with a DOM element with the id #contacts. The hash sign simply happens to be the identifier for an URL fragment and id CSS selector, but that’s where the similarity ends.

    Typically my router looks something like this:

    var AppRouter = Backbone.Router.extend({
      routes: {
        contacts: "contactList"
      },
      contactList: function() {
        var contacts = new ContactCollection();
        var view = new ContactListView({collection:contacts});
        view.render().$el.appendTo("#contacts");
      }
    });
    

    Notice that the #contacts element doesn’t need to be called that. You can call it #pony, or you can render the view directly to the document body if you want.

    So in these terms the workflow is:

    1. Router gets hit
    2. Collection is initialized
    3. View is rendered
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create a simple Twitter client with lazy loading of Twitter
I'm trying to implement lazy loading on a blogger blog, but I'm running into
I am trying to globally disable Fluent NHibernate lazy-loading features, but even after: LazyLoad.Never();
I'm trying to create a lazy loading method using Java Lists that takes in
I'm trying to get my hovermenuextenders to do some lazy loading. I have avatars
Trying to parse some XML but apparently this is too much for a lazy
Have you ever used lazy C++? I am trying to create .CPP files out
I'm currently trying to track down the source of some lazy loading calls in
I'm trying to use beaker cache with SQLAlchemy but I've been receiving errors. Here
While trying to do some tests on lazy loading, to check if i'm understanding

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.