Using Marionette's ItemView, CollectionView, and CompositeView
Marionette (http://marionettejs.com/) is a composite application library for Backbone.js. Developed by Derick Bailey, it is a collection of common patterns and solutions to Backbone problems. It is a great library and lots of developers use it for their Backbone-based applications.
One important thing about Marionette is that it offers several separate packages for views, regions, and so on, and allows you to use any of them freely without requiring the complete library. In this section, we will explore Marionette's ItemView
, the CollectionView
, and the CompositeView
functionalities. These views solve a number of problems we discussed in the previous sections.
ItemView
ItemView
represents a single view for an item, it can be a model view or a collection view. It extends the Marionette.View
class, which is a core view with a number of reusable functions. Marionette.View
takes care of triggering, delegating, and undelegating events...