H
H
HellWalk2017-07-31 17:15:44
Yii
HellWalk, 2017-07-31 17:15:44

How appropriate is the widespread use of Yii::$app-> in a project?

Hello
I'm working on a large project on Yii2, I'm still not well versed in this framework. I read somewhere that using Yii::$app is a bad practice in work (they say it is possible, but rarely).
In the current project, I see that Yii::$app is used everywhere.
I want to clarify - is this really a bad practice, or is it normal?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vasily Nazarov, 2017-07-31
@vnaz

It's bad practice to use Yii for a big project.
If you pick up the project - choose between compatibility (use the coding style that is accepted) and creeping refactoring (gradually change the style to a new one).
In the case when "I don't understand this framework well" - choose compatibility.

M
Maxim Fedorov, 2017-07-31
@qonand

it's bad practice to keep the codebase tightly coupled

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question