Creating a Module for the ContactsApp Sub-Application
Explore how to refactor your Marionette application by structuring it into modular sub-applications, including forming a ContactsApp module with a List sub-module. Understand moving views, resolving naming conflicts, and creating a controller to coordinate models, collections, and views for listing contacts effectively.
We'll cover the following...
So far, we’ve created a separate module for our entities, and we’ve moved our Contact model and collection there.
If we think about it, the entities are general concepts that will be used throughout the ContactManager app. However, our main ContactManager app could contain several sub-applications, such as:
An app that manages contact information (create new contacts, edit their information, etc.)
An app that manages contact groups (friends, coworkers, etc.) and also manages the contacts that belong to them
An app that gives information about the
ContactManagerapp (copyright info, compatibility, etc.)
We’ll create a module to contain our ContactsApp, which will, in turn, contain a ContactsApp.List sub-module to list our contacts. This List sub-module will contain our controller to manage the listing of the contacts and will also ...