3 ms·
> If you have a single page front end setup, and a "RESTful" backend Rails really doesn't encourage this architecture, quite the opposite in fact. > designers
by grncdr 2y ago
> If you have a single page front end setup, and a "RESTful" backend
Rails really doesn't encourage this architecture, quite the opposite in fact.
> designers and users of the applications I have been building for years never want just one model on the screen.
... and this is where Rails excels. When you need to pull in some more data for a screen you just do it. Need to show the most recent reviews of a product in your e-commerce backend? It's probably as simple as:
<%= render @product.reviews.order(created_at: :desc).limit(5) %>
Of course this can have the opposite problem of bloated views taking forever to load, but Rails has lots of caching goodies to mitigate that.
---
Going back to the GP post
> Rails feels like it _prefers_ you build "1 model = 1 concept = 1 REST entity"
That's definitely the simple path, but there are very few constraints on what you can do.