D
D
dkrylov2017-04-20 22:49:33
JavaScript
dkrylov, 2017-04-20 22:49:33

What are JavaScript plugin wrappers used for in Yii2?

Hello ;)
I'm slowly learning yii2 ;)
Actually the question ;) Why use JavaScript plugin wrappers in yii2? Well, in general, probably in any PHP framework.
For example, I wanted to put a jQuery carousel, I can put it as a widget through the composer. And I can just download all the files (css, js) and connect it to AppAseet myself.
What is the ideological meaning of this? In order to update everything at once through composer update ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2017-04-21
@dkrylov

The main idea is that dependencies are connected via Assets. You don't need to connect a js plugin for the whole project or remember about the number of connections and unique ids. Yii solves this issue through the assets manager. Well, there is no need to put js in php.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question