TE
テックエコー
ホーム24時間トップ最新ベスト質問ショー求人
GitHubTwitter
ホーム

テックエコー

Next.jsで構築されたテクノロジーニュースプラットフォームで、グローバルなテクノロジーニュースとディスカッションを提供します。

GitHubTwitter

ホーム

ホーム最新ベスト質問ショー求人

リソース

HackerNews APIオリジナルHackerNewsNext.js

© 2025 テックエコー. すべての権利を保有。

We fell out of love with Next.js and back in love with Ruby on Rails

512 ポイント投稿者: mike1o15日前

42 comments

thembones5日前
Just my opinion but, server‑side rendering never really went away, but the web is finally remembering why it was the default. First paint and SEO are still better when markup comes from the server, which is why frameworks as different as Rails + Turbo, HTMX, Phoenix LiveView, and React Server Components all make SSR the baseline. Those projects have shown that most dashboards and CRUD apps don’t need a client router, global state, or a 200 kB hydration bundle—they just need partial HTML swaps.<p>The real driver is complexity cost. Every line of client JS brings build tooling, npm audit noise, and another supply chain risk. Cutting that payload often makes performance and security better at the same time. Of course, Figma‑ or Gmail‑class apps still benefit from heavy client logic, so the emerging pattern is “HTML by default, JS only where it buys you something.” Think islands, not full SPAs.<p>So yes, the pendulum is swinging back toward the server, but it’s not nostalgia for 2004 PHP. It’s about right‑sizing JavaScript and letting HTML do the boring 90 % of the job it was always good at.
评论 #43881630 未加载
评论 #43882005 未加载
评论 #43881579 未加载
评论 #43882626 未加载
评论 #43882344 未加载
评论 #43884568 未加载
评论 #43883233 未加载
评论 #43882284 未加载
评论 #43899044 未加载
评论 #43883778 未加载
评论 #43881598 未加载
评论 #43886195 未加载
评论 #43881603 未加载
评论 #43884591 未加载
评论 #43883367 未加载
评论 #43882646 未加载
3sbi5日前
I remember reading their blog post about how moving from pages router to app router in Next.js helped their SEO last year. This time they are moving from Next to React+Inertia.js because of growing bills from Vercel even though deploying the same app on your own VPS instead of relying on cloud provider would probably solve the issue. Nonetheless, I still don&#x27;t understand their yearn for complexity - does book tracking app really need GraphQL, separate frontend framework and complicated build process or all that could have been solved by sticking to deploying monolithic RoR app with HTML templates on VPS from the very start?
评论 #43886225 未加载
评论 #43882657 未加载
twodave5日前
We used NextJS on a couple of projects where I work and are already phasing them out. The reasons are manifold, but a few key factors:<p>* difficult auth story. next-auth is limited in a few ways that drove us to use iron-session, such as not being able to use a dynamic identity provider domain (we have some gov clients who require us to use a special domain). This required us to basically own the whole openid flow, which is possible but definitely time we didn’t expect to have to spend in a supposedly mature framework.<p>* because the NextJS server wasn’t our primary API gateway we ended up having to proxy all requests through it just to add an access token to avoid exposing it on the client. The docs around this were not very clear, and this adds yet another hop with random gotchas like request timeout&#x2F;max header size&#x2F;etc.<p>* the framework is very aggressive about getting you on their cloud, and they make decisions accordingly. This was at odds with our goals.<p>* the maintainers aren’t particularly helpful. While on its own this would be easy to look past, there are other tools&#x2F;frameworks we use in spite of their flaws because the maintainers are so accessible and helpful (shout out to Chillicream&#x2F;HotChocolate!)
评论 #43883122 未加载
madethemcry5日前
I truly wonder what people do when they want JS full stack both frontend an backend especially with a DB involved. ORM situation looks pretty fragmented or you write pure sql. And then you still have to decide on the backend. Going raw with express? Next.js, well known, but with a questionable agenda (, Remix, Astro, TanStack, and so on. It&#x27;s a mess, because you always have to recalibrate and re-evaluate what to use.<p>I often see myself going back to Ruby on Rails for my private stuff. It&#x27;s always a pleasure. On the other side, there are so few rails people available (compared to js) that it&#x27;s not viable for any professional project. It would be irresponsible to choose that stack over js and often java for the backend.<p>Anyone have similar feelings?
评论 #43882744 未加载
评论 #43882490 未加载
评论 #43882508 未加载
评论 #43884490 未加载
评论 #43884468 未加载
评论 #43887383 未加载
评论 #43887174 未加载
评论 #43887454 未加载
评论 #43883237 未加载
petetnt4日前
Great that it&#x27;s working for them, but for the end user the feel of the site nearly unusable. There&#x27;s 1s+ of delay on every interaction - pressing &quot;home&quot; button from explore tab takes 1,85 seconds (on a gigabit connection) before home view comes active, without any other feedback to the end user except for &quot;Home&quot; icon becoming active.<p>You cannot just blindly trust the page speed metric but it should be impossible to miss things like this when you are actually using the site. Compare the experience to something like GoodReads that&#x27;s using plain old SSR and you&#x27;ll immediately notice the difference.
评论 #43887424 未加载
评论 #43887346 未加载
t-writescode5日前
Frontend and Backend developers have never really been good at talking, for as long as I&#x27;ve been a developer.<p>As a historically backend-developer, I&#x27;ve tended to dislike Html&#x2F;JS&#x2F;CSS. It&#x27;s a meaningfully different paradigm from the Swing&#x2F;Awt, WinForms, Android UX, etc. That alone was enough to frustrate me and keep me on the backend. To learn how to make frontend, I&#x27;ve had to since learn those 3. They&#x27;re finally becoming familiar.<p>BUT, for front-end developers, they needed to learn &quot;yet another language&quot;; and a lot of these languages have different &#x2F; obnoxious build systems compared to nvm and friends. And then, like anyone who&#x27;s ever changed languages knows, they had to learn a whole bunch of new frameworks, paradigms, etc.<p>Well, they would have, but instead, some of them realized they could push Javascript to the backend. Yes, it&#x27;s come with *a lot* of downsides; but, for the &quot;Get Shit Done&quot; crowd - and especially in the world of &quot;just throw more servers at it&quot; and &quot;VC money is free! Burn it on infra!&quot; these downsides weren&#x27;t anything worth worry about.<p>But the front-end devs - now &quot;full stack devs&quot; but really &quot;javascript all the things&quot; devs -, continued to create in a visible way. This is reflective of all the friggin&#x27; LinkedIn Job Postings right now that require Next.JS &#x2F; Node.JS &#x2F; whatever roles for their &quot;full stack&quot; positions. One language to rule them all, and all that.<p>Just some ramblings, but I think it&#x27;s strongly related to why people would choose Next.JS __ever__, given all its downsides.
austin-cheney5日前
When I see articles and discussions about web + stack I can’t but ask <i>“What problem are they actually solving”</i>? The answer is always: <i>put text on screen</i>.<p>When your business goal is <i>put text on screen</i> the next logical step is to ask how much time and money does the tech stack really save? I have never found a developer that answer that question with a number. That’s a really big problem.
评论 #43881974 未加载
评论 #43882036 未加载
评论 #43883453 未加载
评论 #43883347 未加载
评论 #43881938 未加载
评论 #43882477 未加载
评论 #43881933 未加载
评论 #43888639 未加载
评论 #43882433 未加载
评论 #43884526 未加载
评论 #43881939 未加载
评论 #43881963 未加载
评论 #43883184 未加载
mountainriver5日前
I’ve written a bit of rails and still don’t really get what the raving is about. It was perfectly fine, I didn’t find anything extra special about it.<p>Having just hit severe scaling issues with a python service I’m inclined to only write my servers in Go or Rust anymore. It’s only a bit harder and you get something that can grow with you
评论 #43881516 未加载
评论 #43881538 未加载
评论 #43881555 未加载
评论 #43898778 未加载
评论 #43886739 未加载
评论 #43881545 未加载
ummonk5日前
I can&#x27;t speak to the technical aspects here (I&#x27;m only familiar with nextjs not rails, so it&#x27;s unclear to me how much of the article is just a reflection of the author&#x27;s own comfortability with rails or a reflection of a more technically suitable architecture). But I do find it really weird that a company which apparently has multiple software engineers is worried about infrastructure costs amounting to less than $1k a month... Seems penny-wise pound-foolish to be worried about hosting bills.
评论 #43888055 未加载
评论 #43884010 未加载
henning5日前
&gt; hitting a GraphQL API (Hasura) for getting data, and caching as much as possible using Incremental Static Revalidation. The first load was often a bit slow, but caching helped.<p>Why do you need GraphQL here?<p>If your developer workstation can&#x27;t send a few KB of data over a TCP socket in a reasonable amount of time due to the colossal amount of Zoomer JavaScript abstraction nonsense going on, something has gone terribly wrong.<p>The whole idea of needing &quot;islands&quot; and aggressive caching and all these other solutions to problems you created -- that you have somehow managed to make retrieving a trivial amount of data off a flash storage device or an in-memory storage system of some kind slow -- is ludicrous.
评论 #43882779 未加载
评论 #43888344 未加载
qq995日前
If you&#x27;re thinking about going back to SSR, I think you owe it to yourself to check out Phoenix LiveView (Elixir) and play with it for an afternoon.<p>I&#x27;ve built a few apps in it now, and to me, it starts to feel a bit like server-side React (in a way). All your HTML&#x2F;components stream across to the user in reaction to their actions, so the pages are often very light.<p>Another really big bonus is that a substantial portion of the extras you&#x27;d typically run (Sidekiq, etc) can basically just be baked into the same app. It also makes it dead simple to write resilient async code.<p>It&#x27;s not perfect, but I think it&#x27;s better than RoR
评论 #43882660 未加载
hijp5日前
I think if Rails had focused on giving real first party support to interoperability with whatever frontend framework you brought to the table it would be so much bigger right now. They put a lot of work into Hotwire but I just want to use React, and I&#x27;m sure others want to use what they&#x27;re familiar with.
评论 #43881859 未加载
评论 #43882173 未加载
评论 #43882039 未加载
swyx5日前
&gt; Our hosting bill grew from $30 in April to $142 by June, $354 in August. Hardcover was growing, but 10x cost increase in a few months was too much.<p>without ANY irony or sarcasm, i just want appreciate that its funny how that happens completely without explicit desire or intention to have this effect from the developers of Next (i&#x27;m serious, don&#x27;t hate me guys, we are friends, i do believe that this ofc is not intended)<p>i&#x27;m sure there&#x27;s a good and meaningful explanation (that I&#x27;m interested in reading) but lots of little microdecisions compound when the developer of the framework does not also experience it as a paying customer (or, more subtly, the developer of the framework wants to serve the 10000x larger enterprise customer and needs to make choices to balance that vs the needs of the small)
abhisek5日前
Rail is probably one of the most intuitive framework that I have ever used. No doubt it is highly opinionated but it hides all the complexity for small to medium applications.
评论 #43881762 未加载
morsecodist5日前
I feel like the elephant in the room here is that their back end was in RoR before Next.js and remained that way the entire time. They then switched from next.js to a framework designed, in part, with RoR in mind. It seems unsurprising that they had a much better experience using a thing that was tailored to their use case.<p>I love Next.js. I have used other frameworks including RoR and there is nothing like it (except Svelte or Nuxt but I view them as different flavors of the same core idea). But I only use it to make monoliths. I can see getting frustrated with it if I was using it alongside a different back end.
littlecranky675日前
I wonder why there is a debate Next.js vs. SSR. Nextjs is a hybrid and performs quite well. Contrasting with other SPA frameworks, Nextjs produces prerendered html output for fast first loads, efficient js chunks, config switches to eagerly-load those chunks (ie. when hovering over a link or preloading all n+1 links after page render) and efficient image (pre-)loading depending on breakpoint (usually the achilles heel when comparing to a pure SsR solution).<p>I would really be interested in real world performance metrics comparing load times etc. on a stock nextjs app using defaults vs. rails and co.
评论 #43884416 未加载
arvinsim4日前
I fell in love with React because of its SPA approach, as opposed to SSR.<p>You must imagine my chagrin when React started moving towards rendering on the server(SSR, Server Components, etc). I was happy to move to a full client implementation. Sadly, SEO cannot be ignored.
评论 #43890693 未加载
ronbenton5日前
The whole isomorphic framework trend has always scared the poo out of me. I feel like it&#x27;s just asking for security issues.<p>For people who commonly use these frameworks -- is it common to have issues where data or code intended only for server execution makes its way onto the client? Or are there good safeguards for this?
评论 #43882059 未加载
omneity5日前
I switched from Rails to the node.js ecosystem back in the 3.2 to 4 transition, however looking back I share a similar sentiment as the OP.<p>I recently initiated the backmigration and my approach thus far however has been to take out the &quot;administrative&quot; part out into Rails to benefit from all the useful conventions there, but keep the &quot;business services&quot; in JS or Python and have the two communicate. Best of both worlds, and the potential of all of rubygems, npm and pypi combined.
评论 #43881520 未加载
评论 #43881893 未加载
outlore5日前
IMO the problem with Next is that it can’t decide whether it wants to be a framework for client side apps that require interactivity or server side rendered mostly static content sites. To support both it has codeveloped some baffling features in React like RSC which have made it far less fun to work with.<p>“use client”, server actions that aren’t scrutable in a network tab, laggy page transitions, and, until recently, inscrutable hydration errors: these are some of the recent paper cuts I experienced with Next.<p>I’d still use it for new projects, but I am keen to use TanStack Start when it’s ready<p>i’m personally really interested in the next wave of frameworks that make local first development intuitive, like One or something that bakes in Zero
joshstrange5日前
I&#x27;m thankful that I don&#x27;t work on projects that have SEO needs. SSG (for JS frameworks specifically) feels too unstable for me. I get the value, I understand why people need to do it, but it just makes everything more complicated. Also, I&#x27;m not sure if you can have an offline site with SSG? They might be compatible but I&#x27;m not sure. I know some SSG is essentially &quot;SPA with the first page rendered already&quot; so maybe that can work offline?<p>I looked at InertiaJS and it feels like too much &quot;magic&quot; for me personally. I&#x27;ve never used it so I could be wrong but it feels like too many things you have to get working perfectly and the instability in the JS ecosystem makes me worry about adding too many layers.
评论 #43882010 未加载
评论 #43884065 未加载
exabrial5日前
Server Side Rendering is awesome and FAR simpler and productive and immensely less buggy. Hoping we continue to see people leave the js framework madness behind.
rustc5日前
What&#x27;s the closest thing to Rails in a language with a sound static type system?
评论 #43881776 未加载
评论 #43881648 未加载
评论 #43886203 未加载
评论 #43887013 未加载
评论 #43882029 未加载
评论 #43881769 未加载
评论 #43882288 未加载
评论 #43881677 未加载
评论 #43881940 未加载
bananatron5日前
Rails is particularly nice in a cursor-first world (probably true of any elder framework that has strong opinions&#x2F;conventions).
评论 #43882267 未加载
ezekiel685日前
Even a cursory glance at the runtime performance difference between these two frameworks reveals that either this project won&#x27;t scale to the point that cloud costs are relevant or they have a dubious prioritization of DX over deployment economy. We are talking orders of magnitude fewer RPS for Rails.
评论 #43882746 未加载
ww5205日前
For my most recent project, it was Spring Boot with Java at the backend and Solid.js at the frontend, with REST api in the middle. It has work very well. Solid has a very solid signal based React-style stack. Spring Boot is mature and stable that covers pretty much everything you need at the backend. The only wrinkle is we need to connect to a number of different database systems and the default DataSource can’t do the job. We ended up writing our own multi tenant datasource. We code gen most of the backend code for the hundreds of db tables. The path from DB to the frontend is automated. The whole project took 4.5 months with 1.5 junior developers and .5 architect and senior dev. One advantage is the business side has been nailed solid, with firm spec and feature sets.
insane_dreamer5日前
Many SPA websites don&#x27;t need to be SPAs, and the overhead in terms of complexity vs &quot;old-fashioned&quot; server-side ajax calls (even using something as &quot;ancient&quot; as jQuery) is not worth it, and do not improve the user experience.
dagorenouf4日前
I followed the same journey but was unimpressed by Rails attempt at modernization with Hotwire. Decided to give Elixir + Phoenix a try and immediately fell in love. Just like I had with rails years ago. I highly recommend people to check it out, liveview is a game changer for building modern web apps without the complexity of JS, and without the baggage of using Rails to do it. And performance is mind blowing.
评论 #43885653 未加载
stevebmark5日前
Is this article comparing apples and oranges? For example<p>&gt; loading the entire homepage only takes one query [if you&#x27;re logged out]<p>You can do this with Next.js SSR - there&#x27;s nothing stopping you from reading from a cache in a server action?<p>They also talk about Vercel hosting costs, but then self host Rails? Couldn&#x27;t they have self hosted Next.js as well? Rails notoriously takes 3-4x the resources of other web frameworks because of speed and resources.
评论 #43888215 未加载
chagel4日前
Exploring web programming from the frontend view (e.g., Island Architecture) is always intriguing. I&#x27;d love to see how JS&#x2F;SPAs surpass the SSR&#x2F;HTTP paradigm with LLM&#x2F;AI. Until then, focus on mastering infrastructure, protocols, databases, and APIs — engineering over designing.
bckr5日前
I keep hearing good things about Rails. What are the downsides, other than learning a new language and framework?
评论 #43882476 未加载
评论 #43882749 未加载
评论 #43882492 未加载
评论 #43882540 未加载
评论 #43888321 未加载
评论 #43882272 未加载
评论 #43882413 未加载
评论 #43884951 未加载
评论 #43882292 未加载
评论 #43882422 未加载
revskill5日前
The problem with Next.js, is they over-engineered the whole things for no purpose. But i also think it&#x27;s related to limitation of technical teams.<p>&quot;Simplicity is achieved when there&#x27;s nothing left to remove&quot;.
评论 #43882788 未加载
dzonga5日前
inertia is so nice. rescues you from the hotwire mess. you choose your own frontend framework could be react, vue, svelte while at the same time not spinning an api or dealing with client state etc.
moralestapia5日前
I never really got the appeal of SSR, and I&#x27;ve implemented it a cuouple times with Next.JS and things like htmx.<p>Can anyone come up with the ideal use case where SSR shines? I&#x27;m willing to buy it if I see it.
评论 #43881903 未加载
评论 #43881805 未加载
评论 #43882260 未加载
评论 #43882233 未加载
chrisweekly5日前
&gt; &quot;Sometimes it’s tricky to understand if a problem is in Rails, Inertia-Rails, Inertia.js, React.js or Vite.&quot;<p>You mentioned giving up on Remix after poking at it for a day. IMHO that was a mistake.
reassess_blind4日前
Express JS with Handlebars templating has always been my favourite. Simple, lightweight SSR rendered pages.
DuzAwe5日前
So begins the slow roll backwards because ai can’t support the new.
评论 #43881686 未加载
kookamamie4日前
I find it funny how the generation of content is now called ”server-side rendering” to make it sound cooler than what it actually is.
tonyhart75日前
give it a few months the title would be: &quot;why we go back to (another)JS framework&quot;
lofaszvanitt5日前
From one catastrophe to another. Good.
copperx5日前
Rails is still wonderful. But someone should fork Rails so it ceases to be associated with DHH. CEOs who reveal who they really are become really toxic to the brand. We&#x27;ve seen that happen with Tesla.
评论 #43885969 未加载
评论 #43882256 未加载
评论 #43882998 未加载
评论 #43884657 未加载
评论 #43881915 未加载
welder5日前
Just eww... you were an expert at Rails 10+ years, failed to become an equivalent expert at Next.js so you went back to what you&#x27;re used to. You just didn&#x27;t dive in deep enough.<p>I was the same expert level with Python, now I&#x27;m using trpc, nextjs, drizzle, wakaq-ts, hosted on DO App Platform and you couldn&#x27;t pay me enough to go back to Python, let alone the shitstorm mess that&#x27;s every Rails app I&#x27;ve ever worked on.<p>I&#x27;ve also not seen the 1s Next.js pageloads you had, but I&#x27;m confident of figuring a fix if that becomes a problem.