Take the 2-minute tour ×

What's the point of Application.vent in Marionette? The Application object already extends Backbone.Events, so I can write the following:

window.app = new Backbone.Marionette.Application();
app.on("my:event", function() { console.log(arguments); });

More easily than:

window.app = new Backbone.Marionette.Application();

I've read the source and I can't tell the difference, but that doesn't mean there isn't one, and I'm half-willing to bet there's a good reason it's done the way it is.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

While Application.vent's functionality does overlap Application's built-in events, it adds more functionality than just a simple on/trigger event mechanism because it's an instance of Backbone.Wreqr. This adds command events and a request/response mechanism to allow modules to communicate to each other more easily.

It's still just events at the heart of it, but it aims to make inter-module communication a little easier to follow.

share|improve this answer
Ok, but nothing prevents me from using Application.vent when I want RequestResponse or Command behavior, rather than a simple event, does it? Or do they interact in some way that I'm not understanding? –  Crisfole Sep 30 '13 at 21:29
Correct. Application.vent's behavior is separate from Application's simple event handling so you can choose which one to use depending on your needs. –  Craig J Sep 30 '13 at 21:44

Your Answer


