Defining Modules
Explore how to define modules within Marionette.js to structure your application code efficiently. Understand creating public and private functions inside modules, and learn to centralize data management for easier access and better organization in your JavaScript projects.
We'll cover the following...
We'll cover the following...
Defining a module
Now, we’ll move our contacts to a separate module. That way, we can centralize their management, and when our app needs the contact data, it can simply request it.
Let’s start by creating a new Marionette module:
Note: Lines 1 and 2 are actually a single line in our application, but are displayed across two lines for better readability. We will often come across this situation within the course, and ...