K
K
Klayn242015-05-04 23:07:42
Yii
Klayn24, 2015-05-04 23:07:42

What is the essence of Yii2?

I develop projects on CI, everything suits me, but I decided to master Yii2. I wrote a simple site and in fact everything turned out to be the same as on CI. The question is, how will Yii2 internal goodies make my life easier if I write an online store, for example? What exactly can speed up the development of the site, because I can write all the functionality myself?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
index0h, 2015-05-05
@Klayn24

What exactly can speed up the development of the site, because I can write all the functionality myself?

If your goal is to write what is already there, and it has been tested by a huge number of people, on a bunch of various projects, and even covered with tests. The flag is in your hands and the oar under your arm, go for it. But at one point, you can grow from projects to one developer. It is at this moment that you will realize that when working in a team it is far from always worth writing as you like, your bikes / crutches are usually welcome only in hopeless situations.
An example of a situation: deleting a page, should delete the record from the database and redirect to the previous page, if everything is ok - show the message "everything is ok", if there are errors - display which errors occurred.
The task is trivial, with the help of a samopis it is solved quite simply: we write to the session, display it and delete it from the session. Your colleague, when solving a similar problem, will also write his crutch because there is only one person in the world who knows how the output task is implemented, he will not sit and figure it out for a long time:
* is your solution suitable for his task
* what will happen if your decision is made more abstract
* what will break in case of an error
and very soon even you will not really understand anything there.
But, you can use the ready-made flashMessages component, which is documented and tested, when your colleague sees it, even if he doesn’t know what it is - in a minute of googling he will get to the official help and do the same. Profit

V
Vitaly Khomenko, 2015-05-04
@iiifx

You are not ready yet. Each tool requires its own level of skills and knowledge. CI is morally obsolete, moreover, for a long time. It is used "out of habit" or because old projects sit on it. There is a lot more to write about OOP, ORM, forms, layouts, internal structure, component extensibility, etc. ... but I don't think you understand me. As long as you have enough CI - use it. But it will be better for you if you quickly leave CI and learn how to use Yii2.

L
LAV45, 2015-05-14
@LAV45

Yii has collected the experience of many developers, and in my opinion it is foolish to refuse 100,500 hours that were spent on its development.
Or, you can go this route yourself.ePuCn0G9UVw.jpg

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question