M
M
Maxim Timofeev2016-04-06 11:57:18
JavaScript
Maxim Timofeev, 2016-04-06 11:57:18

Yii2 + Angular Why?

Recently, it has become fashionable to associate a php framework with a js framework. I read articles on the topic, but I don’t see any justifications, except for general phrases: “It’s convenient”, “It reduces the load on the server”.
I can't understand how it is convenient and where exactly the load on the server is reduced? In my opinion, you can also get it with yii + jquery. But I, as a reasonable person, admit that I can be mistaken. Help put it on the shelves.
In fact, I think that it doesn’t matter, for this question, it’s yii and angular, it could be another pair of frameworks.
So what is so tasty adds angular. Because as for me there is a duplication of logics.

Answer the question

In order to leave comments, you need to log in

9 answer(s)
D
Deodatuss, 2016-04-06
@Deodatuss

to remove the hellish jquery sheet and binding events to css selectors

A
Anton Izmailov, 2016-04-06
@WapGeaR

The first is the separation of Backend and Frontend.
The second is the ease of use of JS frameworks, the use of new technologies (ES20 **), a virtual home, SPA, and much more.
And as for me - if you are asking such a question, then it is unlikely that you need to combine it.

A
Anton, 2016-04-06
@karminski

Maksim Timofeev Don't bother, use Yii 2.0 for both back-end and front-end, if it's convenient for you. Work with what is comfortable for you. To the end customer, snot about "oh, how cool he is, this ...", "your site is not completed yet, but it uses the most advanced technologies ..." nafig is not needed. He wants results!

K
KIN1991, 2016-04-06
@KIN1991

Weird question... Do you understand the scope of Angular? It's basically creating SPA(Single Page Applications) aka evernote. You will never make a normal spa with jquery. Well, if your tasks do not go beyond "create a site with whistles and fakes" then yes, you will not need Angular ...

O
Oleg S, 2016-04-06
@1mastodon1

it will go to any framework for the backend and any for the frontend, not necessarily yii and angular, it can be express and react, it generally depends on what and why to write. well Jquery will lose anyway, most likely

J
JohnDaniels, 2016-04-06
@JohnDaniels

In general, yes, about 'reducing the load on the server' always surprises me. Is client lag and slowdown better than insane loads for generating html on the server?

A
Alexander Litvinenko, 2016-04-06
@edli007

not reducing the load, you can do everything on jquery, but the readability and extensibility of the code, the speed of the programmer.
There are no routes in jQuery, no date building, no watchers, nothing else.
Although I personally like Ember more in this regard, although it has a higher entry threshold, it can do everything the same as Angular, but in addition, its code is much easier to maintain later.

E
Egor, 2016-04-06
@want2know

why : declarativeness is not an indicator?
about duplication of logic : something is not clear what exactly is it about?
the whole problem of such articles is that their title indicates some popular framework from the backend side and angular from the frontend. although the main thing is the presence of a rest api, written no matter what, and an angular spa application that uses calls to this api.

N
Nikita, 2016-04-06
@bitver

This is convenient, it reduces the load on the server.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question