When designing modules, it'll be quickly apparent to you that not all modules are alike. Modules can be classified into multiple different types depending on various characteristics. One such classification can be achieved by their functionality or the concerns they address. At the highest level, you can classify modules into two different types:
- Vertical concerns: Business and application specific functionality. Solves a specific problem in the business domain. For example, the accounts module in a banking application.
- Horizontal concerns: Crosscutting functionalities that are not business or application specific. Instead, they provide low level functionality or framework that's business-agnostic. For example, logging or security modules.
When designing modules, a good rule to try and follow is to not mix these two concerns. If you design...