-
Notifications
You must be signed in to change notification settings - Fork 0
3 MMIR Project Structure
This chapter describes the typical directory structure of a MMIR-based application. Figure 10 shows the structure of StarterKit example. If you are familiar with Cordova (previously PhoneGap), you may have noticed that the structure is similar to Cordova projects (v2.x).
Figure 4: Basic directory structure for a MMIR-based application
The framework uses naming conventions in order to keep the configuration simple. Following this convention means, that you use the same name for controller-files (which hold the implementation for the controller), controller-class (the JavaScript class of the controller implementation), and the controller's view directory (the directory which holds all view definitions for the controller) etc.
As a result, you do not have to make additional configurations that tell the framework for instance "view XY for controller AB can be found in location IJ". Instead the framework derives all this information from the controller's name.
Description | Example | |
---|---|---|
[controller name] | the controller's class name | CalendarExample |
\controllers\[controller name].js | File name for controller implementation | calendarExample.js |
\views\[controller name]\[view name].ehtml | A view definition for the controller | calendarExample\main.ehtml |
\views\layouts\[controller name].ehtml | Layout definition for the controller's views | calendarExample.ehtml |
The controller's class name should always start with an upper case letter. The file in which the controller's class is specified may begin with a lower case letter, but except for this, must have the same name.
- 1 Introduction
- 2 What is MMIR
- 3 MMIR Project Structure
- 4 Getting started