L
L
Lenar Mustafin2016-06-21 12:22:30
Yii
Lenar Mustafin, 2016-06-21 12:22:30

How to organize application core in Yii2?

There are 2 services written in Codeigniter. Their part of the functionality is identical - this is authorization, news, FAQ, blog, payment. + unique functionality for each of them. The question arose of rewriting the whole thing in Yii2.
Can you tell me how to correctly allocate common functionality to the core of the application in Yii2?
I just want to make changes to this common functionality in one place, and then just pull it up as a module in each project - I can’t figure out how best: either split the entire core into components (authorization, news, etc.) and connect them as modules (store each in a separate turnip) or create 1 large module that includes everything. Or maybe there is some better way?
Thanks in advance for your help.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Timofeev, 2016-06-21
@lenarm

You make the CORE module, there are other modules in it.
It all depends on what you need, if the modules are independent, then it is convenient to have them as separate modules, if they are an integral part of the kernel, then accordingly.
Here it is rather important when writing this kernel to make it as abstract as possible. He should not care what it is connected to. And 1 is the module or 10 is the second question.

E
Evgeny Bukharev, 2016-06-21
@evgenybuckharev

Можно также использовать advanced шаблон приложения, только не как бекэнд и фронтэнд, а как фронтэнд1, фронтэнд2 и т.д и допустим бекенд. Общие модули складывать в common. Всё остальное разносить по проектам

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question