Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails with angular vs Rails pure (views performance)

I've tried to search on internet information about the views performance with angularJS into Ruby on Rails project vs Ruby on Rails pure. My questions born because 2 months ago I started to work with AngularJS pure and now I need to integrate AngularJS into a new project but need to show what is the performance to render views with AngularJS with Ruby on Rails and remove that charge to Ruby on Rails.

For example:

Angular with Rails:

Get data with Ruby on Rails (from database or GET request), send information to file.js.erb and manipulate data with AngularJS and show views with parse data.

Rails pure:

(natural flow) Get data with Ruby on Rails (from database or GET request), send data to file.html.erb and manipulate data with Ruby.

I know, the questions could be absurd but render view with Ruby on Rails represent a charge to the serve. However, If I manipulate data with AngularJS, I separate the charge to the server and use the web navigator memory.

like image 505
Moises Portillo Avatar asked Nov 29 '16 16:11

Moises Portillo


1 Answers

I think that perfomance is not so much a deal breaker because most tools are already optimized and if you have problems of perfomance the most certain is that it is your code that is bad, now the truth I would suggest separating things and that the Front end is just one more client of the server and maybe to speed things up a bit more use a hybrid of SPA and rendering on the server for the first load but otherwise better a SPA because you can follow a design pattern like MVVM and do More testable to front end so you increase the quality of your development

like image 159
ragar90 Avatar answered Oct 24 '22 07:10

ragar90