Rails with angular vs Rails pure (view view)

I tried to find performance information on the Internet using angularJS in a Ruby on Rails and Ruby on Rails project. My questions arose because 2 months ago I started working with AngularJS clean, and now I need to integrate AngularJS into a new project, but I need to show what the performance is for rendering views using AngularJS with Ruby on Rails and remove this board for Ruby on Rails,

For instance:

Angular with Rails:

Get data from Ruby on Rails (from a database or a GET request), send the information to a .js.erb file and process the data using AngularJS and show the views with the analysis data.

Rails are clean:

(natural flow) Get data from Ruby on Rails (from a database or a GET request), send the data to a .html.erb file and process the data using Ruby.

I know that questions can be absurd, but viewing a view with Ruby on Rails is a fee for submitting. However, if I manipulate data using AngularJS, I share the board with the server and use the memory of the web browser.

+6
source share
1 answer

I think that performance is not just a transaction breaker, because most tools are already optimized, and if you have performance problems, it’s most certain that this is your code, that’s bad, now I would prefer to separate things and that Front end - this is another client of the server and, possibly, accelerate work with hybrid SPA and rendering on the server for the first load, but otherwise SPA is better, because you can follow the design pattern, for example MVVM, and make it more susceptible to testing on the front Plan to improve the quality of development.

+3
source

Source: https://habr.com/ru/post/1012738/


All Articles