javascript - Design decisions in TodoMVC for Backbone Marionette example -
i wondering why in todomvc backbone marionette, marionette.layout
used footer
instead of simple itemview
header
?
also why use compositeview
todolist.views.listview
instead of collectionview
?
i don't see need using layout
in footer. think author thought maybe need add regions footer , used layout
, in actual implementation? no need.
about compositeview
instead of collectionview
. collectionview
doesn't allow have template on it.
imagine need show list of clients don't want simple <ul>
show clients, want headers, information , <ul>
compositeview
can add template can contain header, information , of course <ul>
.
in concrete case, wants show checkbox list, since needs show markup apart <ul>
needs compositeview
able add template.
tl;dr use collectionview
if don't need markup , if so, use compositeview
Comments
Post a Comment