For example, I build a Rails app to handle models, views, and controllers on the backend. Then I can use HTML/CSS/JS to write a frontend to interface with the Rails app. Why do we need another MVC framework on top of Rails?
For example, I build a Rails app to handle models, views, and controllers on the backend. Then I can use HTML/CSS/JS to write a frontend to interface with the Rails app. Why do we need another MVC framework on top of Rails?
Ideally, the models would be shared between client and server without the need for duplicating code. There has been a few steps in that direction in node.js, but it's an ongoing problem that hopefully we'll figure out in the next couple years.
To clarify, when you say RESTful API, do you mean the client-side MVC framework issues API calls to a server which then updates the backend (database?).
I guess this model is client-centric while the typical Rails app is server-centric (MVC logic executes on the server and then serves the relevant HTML/CSS to the client).
Any particular advantages to the client-side framework over the server-side framework?
There are trade-offs, of course: it is a tad more complex than the old way, but that is offset by simpler implementation in the server. Network round-trips are minimized, but you use a lot more memory and CPU on the client, and need more extensive testing. It's a great fit for webapps, not so much for more content-oriented websites.