by Rauchg on 2/6/2023, 4:29:52 AM
I'm biased (having started Next.js), but I found a comment on the recent HN thread "The Market for Lemons"[1] thread quite insightful.
Basically, @christophilus makes the case that projects they'd work with always end up "accreting interactivity to the point that I’d wished we had started with a single, unified, well-structured way for managing the UI that handled interactivity well."
I think that's the core argument for Next.js vs Rails. For Next.js, interactivity, fast page loads and transitions, client-side statefulness are priorities. You can import rich UI components from libraries like https://www.tremor.so/ or https://ui.shadcn.com/ or the dozens of others in seconds.
For Rails, the rich, JS-based interactivity model was not a priority. The reason you probably miss `ActiveRecord` is that we certainly didn't start there, and given it was a focus for Rails, it's probably amazing. The Next.js ecosystem is strengthening a lot in that area, so I'm very optimistic we'll get there too.
In a nutshell, Next.js prioritizes the frontend experience. Rails prioritized the backend. Choose the tech that's best aligned to your goals.
With regards to hiring, there's a very active job market[2], and a very large community[3]. Let me know if you found this helpful!
[1] https://news.ycombinator.com/item?id=34666938
by senttoschool on 2/6/2023, 4:22:04 AM
I would personally go with Rails backend + Next.js front-end. You don't need to use Next.js to build your backend. In fact, I would never use Next.js to build my backend unless it's for something simple.
A lot of things don't work as well with Next.js' serverless backend approach such as database connections, websockets, or even something as simple as a cron job done on the server.
Serverless backends tend to make things more complicated when you're trying to build an MVP - unless cheap scaling is part of that MVP.
by RangerScience on 2/6/2023, 7:10:09 PM
Related: As a fellow Rubyist, Javascript (in general) didn't really "click" until I started using curried functions, particularly / almost entirely when dealing with callbacks. Highly recommend!
by dylanhassinger on 2/6/2023, 4:30:49 AM
Rails backend (since you know it)
Next frontend (to enforce loose coupling)
I am torn. I am master level Rails and advanced beginner React / Next from my time at Tilt back in 2014-2015.
When in doubt, I go to Rails but can't decide if I am just comfortable and holding onto the past, or if it's because ActiveRecord and the opinionated nature of it, is still so good.
How are you all thinking in 2023? I know there is no answer, but I would love to know what others think.
To sharpen, I am more curious about the following dimensions: * Hiring * Maintainability * Community
Less worried about technical aspects, as in my experience those are rarely the things that make or break a project / app.
Also, I know I can build a Rails backend, and then go React on the front-end, might happen, but if I go Rails, I might go full Turbo etc.
Thank you!