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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T13:13:58+00:00 2026-06-02T13:13:58+00:00

My question is mostly conceptual about Backbone.js, but I can mock up some code

  • 0

My question is mostly conceptual about Backbone.js, but I can mock up some code if my question is unclear.

Consider a case where I have 2 sections on a website. A list of items as one view and another view that has a dropdown to select how the list of items should be sorted. Obviously, the list of items is associated with a collection of models that stores the actual data that populates the list. But I’m unsure the best approach for triggering the collection to be sorted differently when the other view’s dropdown changes. Should I be changing the actual order of the collection, or just render the view in the order that I want in the view?

Also, is it a good idea to use a model for the dropdown to keep track of the state of the dropdown, and bind the list of items view to that model so that I know when to rerender the list of items?

  • 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-02T13:13:59+00:00Added an answer on June 2, 2026 at 1:13 pm

    You could take several roads here. Here’s a few:

    1. Use a router. The router would hold your views, or at least the top-level view (cleaner), and your dropdown view would trigger a route change, which would pass the information along to the view. Best if you want clean URLs.
    2. Make a pointer to the list view in the dropdown view. When the dropdown view receives the change event, it explicitly tells the list view to update. (IMO a terrible approach, but listed here for completeness.)
    3. Back everything with models. (Like you suggest in your last question.) The dropdown view would be backed by a model, and the list view could bind to that model’s events. (Again, the list view still has to know about the dropdown model—not ideal.)
    4. Make an event manager. When your dropdown recevies a change, you trigger 'sort' and anything that cares can listen to that event. This isn’t a trivial solution but isn’t overly complex either. Your list view could then register its intent to listen to the sort event with the event manager, thereby abstracting the actual view inside the event manager and away from the dropdown view.

    1 & 4 are effectively the same thing, just depending on whether you want a router or not.

    Basically my heuristic with these sorts of scenarios is “nothing should know about things it doesn’t need to know about.” Applied here, that means that your views shouldn’t know about each other.

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

Sidebar

Related Questions

ok simple question about including large mostly static html and asp.net code I am
I'm posing this question mostly out of curiosity. I've written some code that is
Say I have two tables (I am using Django, but this question is mostly
Hello This is a conceptual question mostly. I have written a stored procedure in
I've seen this question a few times but they mostly have to do with
I have a simple question that I am posing mostly for my curiousity. What
I mostly develop using C#, but I think this question might be suitable for
The question is about Armenian. I'm using sql server 2005, collation SQL_Latin1_General_CP1_CI_AS, data mostly
Question I have two compilers on my hardware C++ and C89 I'm thinking about
This is probably mostly a question about how to use the VS 2010 IDE

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.