Answer the question
In order to leave comments, you need to log in
Do I understand the principle of modular application architecture correctly?
For example, I have a microengine written in php, which has an mvc structure. In it, the implementation of some decisions is written at a minimum.
For example, I want to implement a gallery for some pages of the site. Then (According to my logic) I create a new folder with the name of the module in the modules folder, describe the module class in this folder, add a template file to the folder, in which the gallery is displayed.
Now, in the site page template, I call my module by name and pass the necessary parameters, and after that, a gallery should be displayed on the page. Do I understand correctly? Is this how the module should be called? (taking into account that everything is written in autoload)
And if I need to write a user registration module? How to be here?
I tried a lot to find on modular architecture and didn't find a decent answer. If there are links, please give me so that I fully understand the principles of building a modular architecture. (better with php examples)
Answer the question
In order to leave comments, you need to log in
I use the approach you described in my engine, the idea itself was borrowed from Bitrix. Regarding registration, what is the actual problem, you also implement it as a module and that's it.
See an example of a modular architecture on well-known frameworks such as:
YII, Laravel, Symfony, Zend.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question