I hope the DX will get better soon. But this stack beats rails on scalability, universality, user experience, and many more. It's a trade-off that i found worth the effort.
Seriously, gang: Rails is productive, fun and lets you focus on making your customers happy instead of optimal package composition.
But this is a trade-off i take into account.
I even have a production system running on Rails, with frontend React.
This stack's benefits to me:
- Universality (one Typescript to rule all backend and frontend)
- Separation of concern (no more MVC, only components)
- Scalability (each part could scale independently)
- Modularity (the business logic now could have its own service as a graphql API)
- User interactivity in less code (this is why SSR with React)
My new application on this "modern stack" is nearly to be released. If you want to know more, ping me on twitter @revskill.
Put differently: how much more time and energy would you have had to work on your MVP if you had just used Rails?
Want new feature ?
- Add a graphql API (if not exists) and compile to Typescript typings.
- Develop and deploy a React Component for that feature.
- Install and add to the application.
Further, being stuck in a box also means that the community can rely on that very box and add more extensions with the architecture of the box in mind. A box gives assumptions to build on top of. Sure if you really really need a triangle it’s painful, but then you should ask, do I really need a triangle?
I think the real insight of DHH is that most web apps are not as “unique” as developers would like to believe and that the harmony that comes with conventions, the speed that comes with a unified end to end integrated system, and the focus developers gain for actual impactful choices when many unimportant choices are made for them is an amazing improvement.
He said recently, that insight is as controversial today as when he launched rails, and he is surprised more rails competitors haven’t emerged.
I think the first end to end GraphQL > Single Page App framework that has a similar level of integration to rails will dominate.
- Compile Graphql schema into Typescript typings + Fragments for "Active Record"
- React Hooks as controllers action.
- React Suspense for HTML rendering.
- Apollo for graphql caching
- ExpressJS for middlewares.
- @reach/router for routing.
- @loadable/component for code splitting.
- Serverless for API.
I missed Rails, too. But i found that the "modern stack" is not bad at all. It just needs more time to investigate to find out the best way to reuse features.