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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T14:33:57+00:00 2026-05-31T14:33:57+00:00

I have a web application with require.js, backbone.js and jquery. The brief structure of

  • 0

I have a web application with require.js, backbone.js and jquery.
The brief structure of the app is as follows:

  • There are 2 sections on the screen (toolbar and main content below).

  • There are multiple components (address management, event management), each triggered by a hash fragment change and require a
    page transition.

  • There is one backbone.js router. It’s the heart of the application. The router is activated with a new hash fragment (manually entered,
    back button, menu item selection).

Up until now, in the router, I made the page transition, I DIRECTLY called the controller (“view” in backbone) of the selected component.

So there’s a CENTRAL handling of controller calling.

But this has to change now to a DISTRIBUTED handling. I now need to respond to a new hash fragment from two different places: From the toolbar component and from router.
So my idea is to exchange the direct controller calling mechanism with pub sub. Now MULTIPLE components could register for a special action and the router just “fires the event”.

I searched around and found Chaplin (https://github.com/moviepilot/chaplin), a backbone.js example application.

The developers of Chaplin seem to have a similiar thing called “ApplicationView” (https://github.com/moviepilot/chaplin#toc-router-and-route):

“Between the router and the controllers, there’s the ApplicationView as
a dispatcher.”

Is there anyone who has already this kind of architecture and can tell me his experience with this or has anybody solved this in another way?

  • 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-31T14:33:59+00:00Added an answer on May 31, 2026 at 2:33 pm

    I’ve used a similar, though maybe less complex, architecture in this project. I give a pretty good explanation in this answer to a related question. The quick overview:

    • I manage app-wide events that change the application state using a singleton State model that works similarly to Chaplin’s pub/sub architecture. This is just a basic Backbone model, with some added methods to deal with serializing and deserializing attributes as strings, so they can be set in the URL.

    • Application components that change the application state in response to user interaction or other input do so by setting properties on app.state.

    • Components that need to update when the application state changes do so by binding to change events on app.state (it looks like this is exactly the way Chaplin’s mediator works, though they renamed the methods to fit the pub/sub paradigm).

    • I treat my routers like specialized views that update the address bar and respond to user input in that area. Changing the address (manually or by clicking on a link) causes the router to set() the necessary changes on the app.state model, and everything else updates accordingly.

    I hope that’s helpful – I think it’s a little simpler than the Chaplin approach.

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

Sidebar

Related Questions

I have created a web application in which there are two menus which load
I have web application written in java using Eclipse. It has just one servlet
I have web application which we deployed in a production . We have separate
I have web application and I do not really care about IE6 users. However
I have a web application that should behave differently for internal users than external
I have a web application written in C# that consumes several internal web services.
I have a web application developed with ASP.net and C# that is running on
I have a web application that is becoming rather large. I want to separate
I have a web application that needs to take a file upload from the
I have a web application using ASP.NET 2.0 and I want to know if

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.