TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Why Ruby on Rails still matters

524 点作者 philip12093 个月前

56 条评论

philip12093 个月前
For the hundreds of people reading this article right now - you might be amused to know that you&#x27;re accessing it from a mac mini on my desk:<p><a href="https:&#x2F;&#x2F;www.contraption.co&#x2F;a-mini-data-center&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.contraption.co&#x2F;a-mini-data-center&#x2F;</a><p>(The CPU load from this is pretty negligible).
评论 #43132108 未加载
评论 #43131739 未加载
评论 #43131751 未加载
评论 #43135719 未加载
评论 #43135569 未加载
评论 #43131671 未加载
评论 #43131911 未加载
评论 #43141083 未加载
评论 #43135983 未加载
评论 #43132036 未加载
评论 #43135680 未加载
评论 #43132147 未加载
评论 #43136006 未加载
评论 #43138760 未加载
评论 #43136911 未加载
评论 #43131664 未加载
评论 #43140335 未加载
评论 #43135710 未加载
评论 #43137693 未加载
评论 #43143431 未加载
评论 #43131686 未加载
评论 #43137741 未加载
评论 #43136766 未加载
评论 #43131537 未加载
graypegg3 个月前
I really like web apps that are just CRUD forms. It obviously doesn&#x27;t work for everything, but the &quot;list of X -&gt; form -&gt; updated list of X&quot; user experience works really well for a lot of problem domains, especially ones that interact with the real world. It lets you name your concepts, and gives everything a really sensible place to change it. &quot;Do I have an appointment, let me check the list of appointments&quot;.<p>Contrast that, to more &quot;app-y&quot; patterns, that might have some unifying calendar, or mix things into a dashboard. Those patterns are also useful!! And of course, all buildable in rails as well. But there is something nice about the simplicity of CRUD apps when I end up coming across one.<p>So even though you can build in any style with whatever technology you want:<p>Rails feels like it _prefers_ you build &quot;1 model = 1 concept = 1 REST entity&quot;<p>Next.js (+ many other FE libraries in this react-meta-library group) feels like it _prefers_ you build &quot;1 task&#x2F;view = mixed concepts to accomplish a task = 1 specific screen&quot;
评论 #43131480 未加载
评论 #43137686 未加载
评论 #43131832 未加载
评论 #43147994 未加载
评论 #43131091 未加载
Sincere60663 个月前
Why is the ruby&#x2F;rails community so weird. Half of us just quietly make stuff, but the other half seems to need to sporadically reassure everyone that it&#x27;s not dead, actually.<p>&gt; Rails has started to show its age amid with the current wave of AI-powered applications.<p>Not everything needs to have bloody AI.
评论 #43136580 未加载
评论 #43136571 未加载
评论 #43136127 未加载
评论 #43138808 未加载
mbell3 个月前
&gt; Rails has started to show its age amid with the current wave of AI-powered applications. It struggles with LLM text streaming, parallel processing in Ruby<p>Not at all my experience, actually it was incredibly easy to get this working smoothly with hotwire and no javascript at all (outside the hotwire lib).<p>We have a Rails app with thousands of users streaming agentic chat interfaces, we&#x27;ve had no issues at all with this aspect of things.
评论 #43132592 未加载
评论 #43133844 未加载
btown3 个月前
&gt; Rails has started to show its age amid with the current wave of AI-powered applications. It struggles with LLM text streaming, parallel processing in Ruby, and lacks strong typing for AI coding tools. Despite these constraints, it remains effective.<p>A plug for Django + gevent in this context! You have the Python type system, and while it&#x27;s inferior to TypeScript&#x27;s in many ways, it&#x27;s far more ubiquitous than Ruby&#x27;s Sorbet. For streaming and any kind of IO-bound parallelism, gevent&#x27;s monkey-patches cause every blocking operation to become a event-loop yield... so you can stream many concurrent responses at a time, with a simple generator. CPU-bound parallelism doesn&#x27;t have a great story here, but that&#x27;s less relevant for web applications - and if you&#x27;re simultaneously iterating on ML models and a web backend, they&#x27;d likely run on separate machines anyways, and you can write both in Python without context-switching as a developer.
评论 #43132616 未加载
评论 #43133010 未加载
评论 #43135955 未加载
评论 #43140103 未加载
Alifatisk3 个月前
RoR is a beast, it has its place. The issue we have today is that everything is to fast paced, so fast that people feel the need to follow the latest and greatest, or they will be left behind.<p>This has (in my opinion) lead to a false sense that if something is not hyped as often, then its not used either.
评论 #43131944 未加载
评论 #43135678 未加载
评论 #43139486 未加载
teleforce3 个月前
It&#x27;s very interesting to note that you can build and maintain meta web framework like RoR with Ruby, Django and even D language.<p>Go and Rust are amazing languages, but why can’t they produce a Rails-like framework?<p>Is it just a matter of time before Go&#x2F;Rust create a Rails-like framework, or is something fundamental preventing it?<p>Perhaps this article by Patrick Li (author of Stanza language) has the answers [1].<p>[1] Stop Designing Languages. Write Libraries Instead:<p><a href="https:&#x2F;&#x2F;lbstanza.org&#x2F;purpose_of_programming_languages.html" rel="nofollow">https:&#x2F;&#x2F;lbstanza.org&#x2F;purpose_of_programming_languages.html</a>
评论 #43138417 未加载
评论 #43138405 未加载
评论 #43140561 未加载
评论 #43142700 未加载
评论 #43139304 未加载
评论 #43140705 未加载
dceddia3 个月前
&gt; lacks strong typing for AI coding tools<p>I&#x27;ve heard this criticism a few times – the fear that LLMs will be bad at Rails because there&#x27;s no types – and I don&#x27;t think it&#x27;s accurate.<p>At least in my experience (using the Windsurf IDE with Claude 3.5 Sonnet) LLMs do a very good job in a Rails codebase for stuff like &quot;I want to create a new page for listing Widgets, and a Create page for those Widgets. And then add pagination.&quot;. I&#x27;ve been able to spin up whole new entities with a model&#x2F;view&#x2F;controller and database migration and tests, styled with tailwind.<p>I think the reason strong types don&#x27;t matter as much as we might assume is because Rails has very strong conventions. Routing lives in routes.rb, controllers go under app&#x2F;controllers, most controllers or models will look very similar to other ones, etc.<p>Type information is something that has to be presented to the LLM <i>at runtime</i> for it to be accurate, but convention-over-configuration is stuff that it will have picked up in training data across thousands of Rails apps that look very similar.<p>On top of that, the core Rails stuff hasn&#x27;t drastically changed over time, so there&#x27;s lots of still-accurate StackOverflow questions to train on. (as opposed to something like Next.js which had a huge upheaval over app router vs pages router, and the confusion that would cause in training data).<p>In my opinion the future of LLM-aided Rails development seems pretty bright.
评论 #43133799 未加载
评论 #43133323 未加载
评论 #43136107 未加载
评论 #43136096 未加载
评论 #43134248 未加载
评论 #43136320 未加载
评论 #43133257 未加载
评论 #43133906 未加载
gatinsama3 个月前
I am using Django and I do understand the sentiment.<p>But everything old is new again.<p>Today there is better tooling than ever for these tools. I am using Django with htmx + alpine.js and sending HTML instead of JSON. Breaking free from JSON REST APIs is a huge productivity boost.
评论 #43132499 未加载
评论 #43134193 未加载
lenerdenator3 个月前
RoR is great. Ruby just needs to grow beyond it.<p>I worked at a company that, when faced with the choice between rewriting its Django apps in Python 3, and rewriting them in RoR, decided to go with the latter.<p>Now, I didn&#x27;t like that since I was on an undermanned team that had literally just started a major update of a Django site, and it arguably wasn&#x27;t the right way to go business-wise, but a lot of ideas that have come into Django over the years were ideas that existed in RoR.<p>I&#x27;d like to see that sort of innovation happen in some of the other spaces that Python is in, if for no other reason than to prevent monoculture in those areas. There needs to be offerings for Ruby in other areas, like scientific computing, machine learning&#x2F;AI, and data analysis that get the same uptake that Rails does.
评论 #43140813 未加载
amazingamazing3 个月前
It’s interesting to see how convention over configuration had its hay-day in the 2010s. Angular, EmberJS, Django, and Rails were very, very popular. Now, the new type of modern stack, e.g. React&#x2F;NextJS with bespoke backends consisting of things like NodeJS spaghetti with express seem to have a lot of traction.<p>I base the above assertion mainly on looking at Who’s Hiring posts btw.<p>sidenote - is NextJS really the best “convention over configuration” approach for react? I’d love to just use ember, but most of the community has moved to react, but I really enjoy the opinionated approach
评论 #43135829 未加载
Axsuul3 个月前
Any thoughts on Inertia.js, which seems like a good solution for React + Rails? Feels like you can have your cake and eat it too.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;inertiajs&#x2F;inertia-rails">https:&#x2F;&#x2F;github.com&#x2F;inertiajs&#x2F;inertia-rails</a>
评论 #43131890 未加载
评论 #43131806 未加载
评论 #43132615 未加载
cjk3 个月前
In an era of microservices-and-k8s-all-the-things, Rails monoliths are a breath of fresh air. For stuff that&#x27;s really performance- or latency-sensitive, tacking on a satellite service in Go or Rust works great.
globular-toast3 个月前
I haven&#x27;t actually used RoR, but I&#x27;ve used Django extensively and understand they are fairly similar. How do people build things that aren&#x27;t just CRUD? Django calls itself a &quot;web framework&quot; but I think that&#x27;s wrong, it&#x27;s a CRUD app framework. Is RoR the same?<p>The main problem I have is the mixing up of low-level logic like web and database etc with high-level logic (ie. business rules). The easy path leads to a ball of mud with duplicated business rules across views and forms etc. How are people dealing with this? Does RoR fit into a larger application architecture where it does just the CRUD part and some other systems take over to do the business part?<p>It always seems to start well, you have your models, and views just doing CRUD stuff. But then someone says &quot;I don&#x27;t want to have to create an author before I create a book, let me enter new author details when I enter a book&quot;, and then the whole thing breaks. You need some logic somewhere to create authors but only in certain cases and of course the whole thing needs to be one transaction etc. Then you end up basically undoing all the simple views you did and essentially fighting the system to handle logic it was never designed to handle.<p>In essence, these systems make the easy stuff easy and the hard stuff even harder.
评论 #43138872 未加载
luketheobscure3 个月前
This is an unfortunate comparison. I actually chose Next.js because of its similarity to Rails - it&#x27;s a batteries included, opinionated framework that favors convention over configuration (though it&#x27;s not sold that way since these are not the currently trending buzzwords). There&#x27;s absolutely nothing preventing you from using both tools. Rails works great as an API supporting a Next.js UI.
评论 #43132145 未加载
评论 #43132682 未加载
评论 #43132185 未加载
jes51993 个月前
it’s been quite a few years since I’ve worked in Rails, but I miss it sometimes. None of the other platforms ever completely replicated the functionality of a standard Rails environment circa 2009, so we reinvent the wheel every time. Basic stuff, too: ORM hooks, validations. It’s always a relief when I get to work with someone who has also worked on Rails before, because it means we have a shared vocabulary - there’s no equivalent thing among Python programmers, or JVM programmers, or anywhere else that I’m aware of
评论 #43136223 未加载
评论 #43136499 未加载
评论 #43136267 未加载
评论 #43137064 未加载
hrdwdmrbl3 个月前
Just because of job availability, I&#x27;ve been a JS (Node, React, Next, etc.) dev for almost a decade now. I still feel much more productive with Rails.<p>Rails isn&#x27;t the right tool for every job, but I find that it&#x27;s the right tool more often than not.<p>Rails is architected really well. Many decisions don&#x27;t need to be made at all, and everything has a place. Plus, it&#x27;s very friendly to extensibility and has a healthy ecosystem. It&#x27;s mostly about the code that I don&#x27;t need to write. It&#x27;s really years beyond most other frameworks. Next will get there, but it will take it another 5 years. No shade on others, but Rails is just well built software with many years of learning and improving.<p>For highly reactive or &quot;dynamic&quot; systems, it probably isn&#x27;t the right tool. Building a Figma or Notion. As @graypegg said in their comment, most websites work best as &quot;CRUD forms&quot;. Though I would have said the same about email, but Hey.com exists so YMMV...
评论 #43131845 未加载
mostlysimilar3 个月前
&gt; Rails has started to show its age amid with the current wave of AI-powered applications.<p>A feature, not a bug. Rails will continue to be good for building things long after the AI boom has died down.
usernamed73 个月前
After all these years, rails is still my favorite framework to build with. Although I have become increasingly bored&#x2F;frustrated with the front-end development in rails, which lacks a solid rails-way.
评论 #43133063 未加载
评论 #43133005 未加载
xpe3 个月前
To go in the other direction, static site generators (SSGs) also have a place on the menu. Build locally. Host them on your favorite CDN. I personally really like Zola (Rust), inspired by Hugo (Go).
评论 #43135052 未加载
krashidov3 个月前
&gt; Many of today&#x27;s most polished products, like Linear and ChatGPT launched as Next.js applications, and treated mobile apps as secondary priorities.<p>Linear was started on next.js? I thought they built a custom sync engine? <a href="https:&#x2F;&#x2F;linear.app&#x2F;blog&#x2F;scaling-the-linear-sync-engine" rel="nofollow">https:&#x2F;&#x2F;linear.app&#x2F;blog&#x2F;scaling-the-linear-sync-engine</a><p>I feel like this article is hyping up the importance of next.js.
评论 #43133211 未加载
ram_rar3 个月前
Starting today in what scenario would RoR would be a better option than Next.js for building web app? Assuming one has to start from 0 -&gt; 1 .
评论 #43136362 未加载
评论 #43142005 未加载
评论 #43132955 未加载
评论 #43136510 未加载
评论 #43139959 未加载
henning3 个月前
&quot;Another trillion dollars worth of companies is being built on Next.js, and these web apps are faster and more polished than what could have been built on Ruby on Rails.&quot;<p>This makes absolutely no sense. HTTP is HTTP. Maybe one framework makes something more convenient than the other, but more &quot;polished&quot;? What does that even mean and what exactly is Next.js enabling?
UncleOxidant3 个月前
&gt; It became the foundation for numerous successful companies - Airbnb, Shopify, Github, Instacart, Gusto, Square, and others. Probably a trillion dollars worth of businesses run on Ruby on Rails today.<p>Do those companies still run their businesses on RoR? My impression was that companies started out with it, but migrated to something more robust as their traffic grew.
评论 #43134703 未加载
评论 #43135744 未加载
评论 #43134616 未加载
pgcosta3 个月前
&quot;It struggles with LLM text streaming, parallel processing in Ruby[3], and lacks strong typing for AI coding tools.&quot;<p>What&#x27;s the struggle specifically? How these general articles of opinion get to the first page of HN I&#x27;ll never understand. Just random statements without anything to back them up.
czhu123 个月前
Rails makes me really appreciate the dictatorial nature of it (dhh). Compared to the free for all landscape in javascript, Rails moves a lot slower, but decisively.<p>I started using rails in 2014, and I think this is some of the most exciting days in rails. Hotwire, Turbo, Stimulus + no build JS pushed the framework into what feels like next generation web development.<p>While all the same patterns exist in javascript, it seems like there are 5, 6, 7, 8 ways to do everything. Something as trivial as authentication has multiple implementations online, with multiple libraries, which is hugely frustrating.
pmarreck3 个月前
Of course it still matters.<p>What else would both teach programmers that nice languages exist, and that OOP leads to a nondeterministic spaghetticode hellscape? ;)<p>(I once spent an entire month debugging a transient login issue (session loss bug) on a million-line RoR app. Most of the bug ended up being something which merged a HashWithIndifferentAccess with a regular Hash, and key overwrite was nondeterministic. This type of bug is doubly impossible in something like Elixir- both since it is data-focused and not inheritance-focused, and because it is immutable.)
评论 #43138829 未加载
the__alchemist3 个月前
Along this vein: I learned programming ~15 years ago. On my own, as a hobby. Now it&#x27;s a hobby and day job. Lots of tech churn in this time period. I&#x27;ve branched out into many domains.<p>The constant that&#x27;s been with me from start to end: Django. Because it&#x27;s fantastic and versatile. I still am kind of bitter the tutorial I followed wasted so much time on tangents regarding VirtualBox, Vagrant, Chef... I program most things in rust, but not web, because there is nothing there that compares.
mati3653 个月前
One of the biggest issues is that newer tools often lack Rails integrations. I recently built one for CKEditor - happy to share details if anyone&#x27;s interested.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;Mati365&#x2F;ckeditor5-rails?tab=readme-ov-file">https:&#x2F;&#x2F;github.com&#x2F;Mati365&#x2F;ckeditor5-rails?tab=readme-ov-fil...</a>
评论 #43132998 未加载
cjohnson3183 个月前
I think Rails&#x27;s big contribution is the idea of convention over configuration. Maybe this my own myopia, but Django feels like Rails, and NextJS also borrows from Rails. I&#x27;ve only managed one Rails project in production, and I had to come up to speed really fast to support it, but I loved it.
Glyptodon3 个月前
TBH I&#x27;ve started to like the GraphQL ruby layer in Rails projects as it creates a pretty clean boundary that works well with boilerplate and is more standardized than REST APIs.<p>And I find that the &quot;convention based&quot; approach lends itself well to having AI write stuff for you.
stevev3 个月前
I love Ruby. However, based on my readings, Rust, rocket, seems like a compelling choice due to its true parallel processing capabilities, strong typing, and impressive speed. Perhaps the author has yet to explore other technologies outside of Rails.
neonsunset3 个月前
It does not when ASP.NET Core exists. UX just as good or even better, 10x performance.
rednafi3 个月前
I feel the same, but for Django, even though I don’t write Python as much these days.
tantalor3 个月前
&gt; Next.js now serves as the most common tool for building a startup.<p>This is completely unfounded.
评论 #43131675 未加载
评论 #43131473 未加载
matijash3 个月前
Ruby on Rails has an amazing DX (e.g. engines). We are trying to recreate that for JS with Wasp (<a href="https:&#x2F;&#x2F;github.com&#x2F;wasp-lang&#x2F;wasp">https:&#x2F;&#x2F;github.com&#x2F;wasp-lang&#x2F;wasp</a>)
raintrees3 个月前
&quot;Developers choose Rails today because, 20 years later, it remains the most simple and abstracted way to build a web application.&quot;<p>Well, then there are those of us who use Django for similar reasons :)
aosaigh3 个月前
Is Next.js really that popular? What else are people building back-end applications with? Are they just NOT building back-end applications and moving to services like Next.js with function-based hybrid backends?
评论 #43141922 未加载
matt-p3 个月前
&quot;Next.js enabled websites to approach iPhone app quality.&quot;<p>This is a fascinating perspective, because building PWAs with raw js and very early react I always felt these were as good as iPhone app quality.
yayitswei3 个月前
I wouldn&#x27;t say Rails is the most simple and abstracted way to build a web application. More so than Next.js, yes, but there are both older and newer technologies that keep things simpler.
评论 #43136340 未加载
m11a3 个月前
It&#x27;s still my favourite web framework. I just wish the Ruby language had better support for type annotations (like Python does). Then it&#x27;d be sorta perfect for me
mathgladiator3 个月前
I&#x27;ve started to use PHP again because AI deals with it nearly perfectly such that I can focus entirely on the product without trivia deep dives.
cratermoon3 个月前
COBOL still matters, too. Would I chose to start a new project with it today, in 2025? Hell naw.
kilroy1233 个月前
I so wish we had Rails for JavaScript. Many have tried but no equivalent exists.
canadiantim3 个月前
Does Django still matter too?
评论 #43133263 未加载
评论 #43136804 未加载
hot_town3 个月前
Wasp is the Rails for JS (React&#x2F;NodeJS&#x2F;Prisma)
andrewstuart3 个月前
“Your grandpas vinyl records” as analogy for Ruby on Rails.<p>Love it.
DeathArrow3 个月前
&gt;It became the foundation for numerous successful companies<p>And after the MVP phase passed and the company became successful, they usually rewrote the software in something else.
评论 #43137206 未加载
fijiaarone3 个月前
I only read the first sentence, but try running a Next.js app from 2 years ago.<p>Good luck with that.
thdhhghgbhy3 个月前
I miss writing Ruby.
revskill3 个月前
Not adopting SPA architecture is the MAIN mistake of DHH and RoR committee.
评论 #43147406 未加载
openplatypus3 个月前
RoR needs to distance itself from DHH to matter.
评论 #43133810 未加载
评论 #43133952 未加载
评论 #43136170 未加载
mulnz3 个月前
No.
y0ssar1an3 个月前
You know a language is dying when you start seeing articles like this.
thr0waway0013 个月前
I haven&#x27;t learned PHP nor Ruby but if I had to go with one it would be PHP. Seems like I&#x27;d get the most utility out of it and prospects in my area.<p>In fact, I&#x27;ve never seen a RoR job posted in my area. Mostly PHP, Python and JS.<p>But you know, you gotta give credit where credit is due. Laravel would not be a thing if it weren&#x27;t for RoR. RoR was incredibly influential.<p>Ok, so maybe I exaggerated, I&#x27;ve dabbled in these languages. Not really formally learned them. Or at least .... I can&#x27;t say I&#x27;ve learned them if I haven&#x27;t done any paid work with them.
评论 #43136853 未加载
Sparkyte3 个月前
As someone who directly worked on Ruby on Rails with developers, their worflows and deployments. It is far too niche to be viable in the mainstream and provides even less incentive to newer languages.<p>But it is a fun language.<p>Also latest Python is faster than the current Ruby let that sink in. You can go even faster if you do a compiled Python like PuPu.