...
- the higher the level, the less reusable the services provided by its modules.
- conversely, the lower the level, the more reusable its services.
- the higher the level, the more frequently the modules will change.
- conversely, the lower the level, the more stable the services provided by its modules.
Rules for Module Use
For this scheme to work, and to provide benefit, we need to impose the following rules, or guidelines, for using the modules, and for determining where new code should go:
- Downward calls only. A module can use services in another module only if the other module module is in a lower level. From this rule follows:
- No upward calls.
- No sideways calls.
If you are developing a service intended to go in a level 2 module (for example, a grading service) and you find that your new service needs to call out to a service in the registration module - also a level 2 module - you will need to move your new service to a level 1 module where it can safely aggregate lower-level services.