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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:23:43+00:00 2026-06-12T01:23:43+00:00

I am currently rewriting an already existing application using the Backbone.js Marionette framework. The

  • 0

I am currently rewriting an already existing application using the Backbone.js Marionette framework. The new stack should be fairly modular, so that new controllers could be added quite easily. The application has a node.js backend and provides a json response for each call.

The application is defined using (like already stated) an Marionette application:

PlugUI.js:
var PlugUI = new Backbone.Marionette.Application();

PlugUI.addRegions({
//  adminBarRegion: "#adminbar",
  contentRegion: "#content"
});

PlugUI.bind("routing:started", function(options){
  Backbone.history.start();
  PlugUI.Navigation.showNavigation();
});

Backbone.Marionette.TemplateCache.prototype.loadTemplate = function(templateId, callback){
  ...
});
}

So, I guess, this is fairly standard. Then I do provide a “controller” with some fairly standard content (meaning the model, the view and the router methods), like so:

PlugUI.module("Status", function(Status, PlugUI, Backbone, Marionette, $, _) {
  // define the model
  Status.Status = Backbone.Model.extend({
    defaults: {
       ...
    },
    urlRoot: function() {
      return '/api/status';
    },

    fetchStatus: function() {
      var status = new Status.Status();
      status.fetch({
        success: function(data, response){
          Status.showStatus(response);
        }
      })
    }
  });

  Status.showStatus = function(model){
  var status = new Status.Status(model);
  var statusView = new Status.StatusView({
    model: status
  });

  PlugUI.layout.main.show(statusView);
  // add trigger, so that navbar is shown ;-)
  PlugUI.vent.trigger("navbar:show", "status-icon");
}

Status.StatusView = Backbone.Marionette.ItemView.extend({
  tagName: "div",
  className: "one-third column statusbox",
  template: "#status"
});

Status.Router = Backbone.Marionette.AppRouter.extend({
  appRoutes: {
    "status": "showUniqueStatus"
  }
});  

PlugUI.addInitializer(function(options){
  Status.router = new Status.Router({
    controller: PlugUI.Status
  }); 

  PlugUI.vent.trigger("routing:started");    
})
})

This works quite nicely, as long as I trigger the view of this one controller directly. If I add another controller with sort of the same stuff in there and trigger the show method via the router, then basically nothing happens. I have now added an event in the frontend, to show the view in the new controller, and this does work, but I thought that the stuff should be working via the router. Did I understood something wrong?

For the full (not working) source code, take a look at the github project.

Any help is really appreciated.

  • 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-12T01:23:44+00:00Added an answer on June 12, 2026 at 1:23 am

    Sorry for really really long delay, but …

    The suggested solution (moving the initializers) is part of the solution. Furthermore I triggered the event “routing:started”, and this event fired “Backbone.history.start();”. I have moved the call to this method to “initialize:after”, now everything works perfect.

    PlugUI.bind("initialize:after", function(optionns) {
      console.log("initialize:after");
      Backbone.history.start();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently rewriting some existing technologies that were once using RSA Security's libraries into
We're currently rewriting our organizations ASP.NET MVC application which has been written twice already.
I'm currently rewriting an old app with Backbone and Marionette. In my module file
We have a fairly complex application that was previously using WebForms. We are in
I am currently working on rewriting an application to use Data Mappers that completely
I'm using Intelligencia url rewriting currently but have just leased an IIS 7.5 server
Currently, I am writing a MiddleWare application that synchronizes information between and accounting application
I'm currently rewriting an old VB6 program in C# in the .Net Framework 2.0
I'm currently rewriting a PHP Extension that was originally written for PHP 4.2.2. My
I am new to Java and i am currently rewriting a Perl code in

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.