< >

Marionette Classes

Marionette follows Backbone's pseudo-class architecture. This documentation is meant to provide a comprehensive listing of those classes so that the reader can have a high-level view and understand functional similarities between the classes. All of these classes share a common set of functionality.

Marionette.View

A View is used for managing portions of the DOM via a single parent DOM element or el. It provides a consistent interface for managing the content of the el which is typically administered by serializing a Backbone.Model or Backbone.Collection and rendering a template with the serialized data into the Views el.

The View provides event delegation for capturing and handling DOM interactions as well as the ability to separate concerns into smaller, managed child views.

View includes:

A View can have Regions and Behaviors

Marionette.CollectionView

A CollectionView like View manages a portion of the DOM via a single parent DOM element or el. This view manages an ordered set of child views that are shown within the view's el. These children are most often created to match the models of a Backbone.Collection though a CollectionView does not require a collection and can manage any set of views.

CollectionView includes:

A CollectionView can have Behaviors.

Marionette.Region

Regions provide consistent methods to manage, show and destroy views in your applications and views.

Region includes:

Marionette.Behavior

A Behavior provides a clean separation of concerns to your view logic, allowing you to share common user-facing operations between your views.

Behavior includes:

Marionette.Application

An Application provides hooks for organizing and initiating other elements and a view tree.

Application includes:

An Application can have a single region.

Marionette.MnObject

MnObject incorporates backbone conventions initialize, cid and extend.

MnObject includes:

Routing in Marionette

Users of versions of Marionette prior to v4 will notice that a router is no longer bundled. The Marionette.AppRouter was extracted and the core library will no longer hold an opinion on routing.

Continue Reading about routing in Marionette.

Improve this page