Answer the question
In order to leave comments, you need to log in
Yii 1 - how to properly organize a modular structure?
Good afternoon, colleagues. The following situation has arisen. It is necessary to implement a modular application in Yii. Initial modules - catalog, magazine. Each of these modules must have front & back parts. The following module scheme is drawn in my head, with modules stacked:
frontend/catalog
frontend/magazine
backend/catalog
backend/magazine
What are the pros and cons of such a scheme?:
catalog/frontend
catalog/backend
magazine/frontend
magazine/backend
Other modules will appear in the future eg API. It doesn't need a backend. The modules will interact with each other, for example, articles from the journal will be mentioned in the catalog. Help organize the structure correctly. Thank you!
Answer the question
In order to leave comments, you need to log in
As an option, make the catalog module inside it two additional frontend and backend modules, also consider a system of controllers for inheriting the frontend and backend, which in turn will be inherited from one common one, I also use a gadget in my projects that allows you to store routing rules in the modules themselves that eliminates confusion
Isn't it easier to make modules without nesting?
catalogfrontend
catalogbackend
magazinefrontend
magazinebackend
Nested modules are too much for me. Better divided by applications: www.yiiframework.com/wiki/33/organize-directories-...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question