vendredi 8 décembre 2017

Dividing code between Rails and a MVC JS framework

When making a Ruby/Rails SPA app with an MVC JS framework such as Angular or EmberJS, I am unsure how to divide the code between the Rails and the JS framework, as both are MVC.

Rails 5.1 is a lot better with a JS MVC framework compared to Rails 5.0, but it is still clear that Rails wants the view part to be thin. The problem then is the JS framework wants the backend to just be pretty much just an data backend.

So the question is, when using Rails with a MVC JS framework, how to divide and structure the code as the two have fundamentally different opinion how the app should be structured?

Or is the answer, don't use Angular or EmberJS with Rails, but rather something such as VueJS which only does the View part?

Are there books, online courses, or perhaps blogs posts that explains this dilemma?




Aucun commentaire:

Enregistrer un commentaire