J
J
JustJazz2016-06-01 02:37:02
Yii
JustJazz, 2016-06-01 02:37:02

Yii advanced app. How to implement module structure?

Hello. There was a problem understanding how to use modules in an application like yii-advanced.
The project has three applications:
1. backend - interface for administrators (backend.site.loc);
2. frontend - client side (site.loc).
3. console - background processes It is
necessary to develop two modules, for example, a catalog of films and reviews of films. Two separate modules but which are very closely related, for example, ratios in the database. How to properly structure models so that these modules can be used in backend and frontend?
Right now the main idea is:
-frontend\modules\films
-- controllers
-- models
-- views
-backend\modules\films
-- controllers
-- models
-- views
and put common models in
common common\modules\films\models\Film
common\modules\reviews\models\FilmReview
What other practices are there for this type of yii application? The application is very large and storing all controllers in one directory is not very convenient, and models are generally hell, but it is also difficult to ensure the self-sufficiency of the module, since all modules are very closely related + must be available in different applications (for example, console or api).

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question