Skip to content

Instantly share code, notes, and snippets.

@benmccormick
Last active November 17, 2018 10:01
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benmccormick/8b6c2647b9adf54d9a7a to your computer and use it in GitHub Desktop.
Save benmccormick/8b6c2647b9adf54d9a7a to your computer and use it in GitHub Desktop.
Marionette v2 and v3 Concepts

Marionette 3 is currently in development, but one of its main thrusts is going to be simplifying the concepts needed for Marionette Developers. This involves deprecating and renaming some features. This gist is meant to provide a mapping of V2 to V3 concepts to help developers plan for and understand v3.

Disclaimers:

  • this is not an official document
  • I'm not on the Mn core team, this is just the understanding of an observer of the library
  • Mn V3 is still in development. I'll try to keep this document up to date, but if something looks wrong please leave a comment and double check.

Concepts table

Marionette v2 Concept Equivalent Marionette v3 Concept Details
Application Application Applications will still exist, possibly with tighter router integration
Application Regions View Application Regions have been deprecated, the primary recommended replacement is to attach a root View directly to the DOM that you don't render, using its regions and initialize function to show child views
AppRouter TBD Stay tuned: There is current work on 2 separate routers, a BaseRouter and a StateRouter
Behaviors Behaviors No major changes to Behaviors planned
CollectionView CollectionView CollectionViews will remain roughly the same
CompositeView CompositeView or View + CollectionView used together There will be some minor changes to Views and CollectionViews to support the CompositeView use case. But those may not make V3
Controller Object Object already replaced controller in most cases in 2.1. Going forward its recommended to use plain objects for specifying router callbacks, making Controller unecessary
ItemView View ItemView and LayoutView are merged into View
LayoutView View ItemView and LayoutView are merged into View
Module Module (may be renamed to SubApp or similar) Recommendation is to move towards more standardized module formats like AMD, CommonJS, or ES6 modules for specifying dependencies -
Object Object Object is the same
View AbstractView View has been renamed Abstract View. In v3 View is equivalent to LayoutView in v2.
Wreqr Backbone.Radio Wreqr is replaced by Radio as the recommended message bus in v3. Its still unclear whether it will be a hard dependency or a recommended addition, or how tightly it will be integrated into the other components
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment