I have an application built on Backbone. As it becomes more complex, I appreciate the transition to Marionette, but I'm not sure how to structure my views.
Existing application views are structured as follows:
BaseView = Backbone.View.extend({ ... })
BaseView is the root of all views. It basically has a rendering function with basic elements, such as: rendering templates, page localization, selecting the active menu, etc.
ListView = BaseView.extend({ ... })
Here, the rendering method contains common code for all lists, such as loading and using the DataTables plugin, common events for edititem, additem, deleteitem, etc.
FormView = BaseView.extend({ ... })
It manages generic forms using the Backbone.ModelBinder plugin and handles form validation.
All of my app views range from one of the above to improve code reuse. For example, I have an AccountFormView that extends from FormView, where I only have certain logic (a few lines of code) to process account information. All common logic is inherited from the ideas of parents.
How can I get something like this using Marionette Views?
Thanks Fabrizio