Not to mention, the combined approach is 100% necessary if you are going to require a server render for your react||vue|ember stuff.
Not to mention, the combined approach is 100% necessary if you are going to require a server render for your react||vue|ember stuff.
That is not true, you just call what you need from the JS framework and you can still use the old HAML in the other areas.
Why’s that?
We as developers already offload certain tasks to separate servers. Do you use your app server to terminate TLS connections? You could; but why would you when Nginx can do a much better job of it?
You could store you application data like usernames and password in a JSON file if you really wanted to. But why would you when you can run an SQL server and use a real database?
Pick the best tool for each job. JS frameworks handle the view layer better than Rails does.
Faster? I don't see how putting an entire app server layer in between your HTTP requests is going to make anything faster.
More maintainable? You now have an entire codebase duplicating the request your client is making. It actually breaks SRP more than it helps, because you'll need to constantly keep it in sync with your rendering/client codebase in order to perform server rendering. The individual codebases may be more maintainable but your application as a whole now has fragmented responsibilities.
I can't imagine when the trade-off of introducing an entire new layer of infrastructure into your app in addition to your normal app servers would be worth it just for the purpose of server side rendering outside of some specific niche scenario. That sounds like overengineering to the extreme.
This is factually wrong. You have a small component that mounts your front-end like a pure function. No loss in maintainability, no "duplicate" anything.
That's two different places that logic must be deployed to and tested against. It's irrelevant that it's the same render code.
The only time I can justify SPA is if you’re primarily differentiating via the UX.