Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Backbone Marionette Difference between CompositeView & CollectionView?

I see that both share almost the same properties & functions so what is the main difference for these two?

like image 505
Ivan Juarez Avatar asked Oct 02 '12 21:10

Ivan Juarez


1 Answers

That question is addressed here: https://github.com/marionettejs/backbone.marionette/wiki/Use-cases-for-the-different-views

In short, you'll want to use CompositeView if you want to wrap a template around the collection (ex: a list with a header and footer). CollectionView doesn't know how to render a template.

like image 67
Sean Parmelee Avatar answered Nov 16 '22 03:11

Sean Parmelee