The View's constructor should take an optional model
. It should also take an optional el
so that the user can use a pre-made element instead of the View creating its own. If necessary, it should take additional options
as a dictionary.
For convenience, add an el -> options
overload if you add an options
argument.
The View's template should live at .template
if one exists so that it can be overriden if need be. The HTML for the view's template is also part of it's spec, so it should be well thought out. Use namespaced class names for child elements to avoid collisions (for example an .integration
element's label would be .integration-label
).