- Shared – This will contain common codes that can be shared by the other modules in this package to avoid code duplication and ensure a common behaviour among the modules, where required.
- Forex – Responsible for all things exchange rate related
- Stock – Responsible for stock related information such as managing stock data of companies listed on a stock exchange (SE), managing indices of a SE, etc.
- StockSimulator – Responsible for managing a stock simulator/ stock virtual portfolio to enable participants try out how the stock market works without taking any of the risks in the real market since real money is not used.
The Directory StructureThe directory structure for a module will follow these
- commands – Scripts meant to be executed from the terminal and, as a result, can be scheduled to run automated tasks fetching data from external sources, sending notifications such as newsletters to subscribers, etc.
- controllers – The C part of the Model-view-controller (MVC) architectural pattern
- events – Contains event-related codes for inter-module communication where interested modules subscribe to the defined events and handle their own processing based on the fired/raised events
- migrations – Scripts for creating/modifying
- models – The M part of the MVC architectural pattern
- services – Contains domain specific logic and acts as the only point of contact for this module.
- views – The V part of the MVC architectural pattern
- widgets – UI blocking blocks that can be used to compose an interface or a view for the user.
- Module.php – Defines the module and can have codes to be run during the initialization of the module, i.e. during the bootstrap process. The name can be anything other than Module.php but we will stick to this for consistency.