M
M
M1Anderson2015-03-29 08:41:23
JavaScript
M1Anderson, 2015-03-29 08:41:23

How can js frameworks (React, Angular) help?

Everything is clear with MVC frameworks, but they do not interest me. And what about tools aimed more at the frontend (React, Angular)?
For all the time of studying, they were useful to me only for the implementation of tabs, so as not to reload the page, but this can also be done through jQuery.
Interested in:

  1. Have you had practical tasks that only a js framework could handle? Which?
  2. Could these tools be useful in collaborating with Rails, for example?
  3. Do I need to spend time at all and look for tasks that can be solved with the usual jQuery, which everyone knows to a greater extent (a question of further support)?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2015-03-29
@M1Anderson

Everything is clear with MVC frameworks, but they do not interest me. And what about tools aimed more at the frontend (React, Angular)?

I'll tell you a terrible secret - MVC frameworks are aimed at the frontend, and not at the backend.
ReactJS is a library, not a framework. This is the first. And this library solves the problem of optimizing interaction with the DOM when linking data between the view and the data model.
Angular is a full-fledged framework to which you can connect the same React for views. It is mainly used in the implementation of Single Page Applications.
All tasks can be solved on anything. The question is timing and curvature. Angular allows you to organize the structure of the application, divide it into layers, provides a ViewModel ... all that writing from scratch is a little hell and boring. Well, again, everything can be covered with tests, etc.
If you take angular - I use it only in the context of SPA. It may not be the whole application, but only some part of it, but still ... And for SPA, there is no difference at all on what the backend is implemented on. From the backend, only the apishka is needed.
React can be used in principle to build a view on the client. So you can use it too. Depends on the task. Let's say if the tasks include organizing the work of a bold form, then it's better to take knockout.js. And if you need to render some data in real time, you can arm yourself with React.
A lot of people know jQuery but don't know JS. And this is sadness and sadness. Most likely, if you need to implement a slider or something like that in your tasks, then you don’t need either Angular or React. Well, or in the context of sites, there is also not much benefit from them (only in specific cases). But if you write some kind of applications, you can already think about it, because if you have to implement the entire boilerplate, and even if there is no DI, then with a high degree of probability (still normal developers exist) you will get a piece of guano wildly connected and painful when refactoring. And using only jQuery is 99% the absence of any front-end tests.
ps I write admin panels in angular for example for my projects. Well, everything, everything that fits into the SPA concept. I plan to use React as an alternative to phonegap (react-native is out), since it is an abstraction layer over the presentation (due to the intermediate virtual DOM).

L
lega, 2015-03-29
@lega

this can be done with jQuery as well.
Here's a question for you to get a feel for: "Why are you using Rails when the same can be done in asm or C?"
"Frameworks" can simplify, speed up development. Try to make such an example on jQuery , note that such simple "tasks" can be done without using JS code at all (i.e. a template is enough).
If the question is "is it worth learning" - it is (if you are doing something serious on the client).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question