1. Logical architecture
This part explains the design pattern of the system.
The different layers of the system are:
Represents the persistent classes of the system. For example A Book class.
NB: The classes of the model do not deal with processing concerning data persistence.
Concerns the form (representation) it interacts with the model. The view mainly concerns the representation of model data on the screen (or on any other output device).
The controller manages interactions with the user and determines what processing should be performed.
d. Persistence or DAO (Data Access Object)
Responsible for managing persistent objects, ie managing interactions with the data access medium (for example the database).
2. Global diagrams
Represents any call made to the server. It can be a request from the browser, a call from another server, an AJAX request …
Main entry point of the system its role is to create the router and initialize it.
Main class of the system. It delegates the analysis of requests to the Router.
Class used to analyze requests and manage url routing.
Its role is to retrieve the user’s request, format it. From this request, detect the navigation language, find out which sub-application (Back office or Front office, API, etc.) is concerned, find the controller to run. Once it has found the corresponding controller, its remaining work is to retrieve the instance of the sub application and ask it to run the controller.
e. Sub application
Class of responsible for managing a sub-part (Front office, Back office, API, etc.) of the application. When processing a request, she must instantiate and execute the appropriate controller.
Analyzes the user’s request and performs the appropriate processing, then returns the response.
Result returned to the user.
3. System sequence diagram
– The request: The user initiates the request (Example: localhost / muuska / en / home) to the server.
– The index.php file: instantiates the application and executes its “run” method.
– The application: instantiates the router and executes its “run” method.
– Routing: The router builds the request and initiates the response flow then, it launches the analysis of the request in order to determine the parameters necessary for the identification of the controller (The name of the controller, the action, the navigation language , the sub-application concerned, etc.). Once the analysis of the request is complete, the router must retrieve the instance of the sub-application concerned by the request and then ask the sub-application to run the controller.
– Controller execution: The sub-application must create the controller instance to process the user’s request. Once the controller instance is created, the sub-application must verify the authentication and then verify user access. Once all the checks are done, the sub-application will call the “executeAction” method of the controller found.
– Execution of the action by the controller: The controller performs the appropriate processing based on the user’s action and then calls the “outputResult” method for the return of the response.