Rails is done
Rails is done / Rails 已经完成了
If you need more context on why Rails needs a new leadership, here is David Celis summing it up a year ago, Paul Battley a few weeks ago, and—even though it is hard to believe—it even got worse since then. How could a fork even work? Rails is a huge code base and has multiple engineers who can invest significant work time into improving it. How could a few people fork and maintain it in their free time? Because Rails is done.
如果你需要了解为什么 Rails 需要新的领导层,David Celis 在一年前、Paul Battley 在几周前都对此进行了总结——尽管难以置信,但情况自那以后甚至变得更糟了。分叉(Fork)怎么可能行得通呢?Rails 是一个庞大的代码库,拥有多名可以投入大量工作时间进行改进的工程师。少数人怎么可能在业余时间分叉并维护它?因为 Rails 已经完成了。
Since I started to update The Rails 5 Way to Rails 6 (and then later 7 and 8), I’ve been monitoring the changes to Rails closely: If you generate a Rails application with rails new —minimal, you only get the core parts of the framework (railties, actionpack, activesupport, activemodel, activerecord and actionview). There is a lot of other stuff in Rails nowadays, but if you focus in on those parts, they are done. We haven’t seen any major changes to these core gems since Rails 6.0 in 2019 (outside of ActiveRecord) with the introduction of the Zeitwerk autoloader.
自从我开始将《The Rails 5 Way》更新到 Rails 6(后来是 7 和 8)以来,我一直密切关注 Rails 的变化:如果你使用 rails new --minimal 生成一个 Rails 应用程序,你只会得到框架的核心部分(railties, actionpack, activesupport, activemodel, activerecord 和 actionview)。如今 Rails 中有很多其他东西,但如果你专注于这些核心部分,它们已经完成了。自 2019 年 Rails 6.0 引入 Zeitwerk 自动加载器以来,除了 ActiveRecord 之外,我们还没有看到这些核心 gem 有任何重大变化。
What has happened since are just additional components that are just gems or npm packages you could add if you fancy them: A series of asset pipelines. A set of JavaScript libraries you could use with Rails, or any other Ruby/PHP/Java/… framework. A deployment tool that can deploy any containerized web application. A reverse proxy written in Go. New default gems as backends for ActiveJob, ActionCable and caching. Why is that? Because Rails is done, and that’s great! It covers the needs for web apps from small to large, and there is nothing you need to add to it.
此后发生的事情只是增加了一些组件,它们仅仅是你如果喜欢就可以添加的 gem 或 npm 包:一系列资源管道(asset pipelines);一套你可以与 Rails 或任何其他 Ruby/PHP/Java 等框架一起使用的 JavaScript 库;一个可以部署任何容器化 Web 应用程序的部署工具;一个用 Go 编写的反向代理;以及作为 ActiveJob、ActionCable 和缓存后端的新默认 gem。为什么会这样?因为 Rails 已经完成了,这太棒了!它涵盖了从小型到大型 Web 应用程序的需求,你无需再向其中添加任何东西。
So if all we fork is the core and not all the optional gems you could add on top of it, we have a stable target. The job is to monitor the Rails repository for security patches and port them to the fork as well as look for performance and smaller improvements and evaluate if we should add them. This will be challenging, but doable.
因此,如果我们只分叉核心部分,而不是分叉所有可以添加在上面的可选 gem,我们就拥有了一个稳定的目标。我们的工作是监控 Rails 仓库的安全补丁并将其移植到分叉版本中,同时寻找性能和较小的改进,并评估是否应该添加它们。这将充满挑战,但并非不可行。
Codename: Amiko / 代号:Amiko
Right now, we have a really nice community building up in Matrix and spikes of how the fork will work. The current name is Amiko, but it will probably change before we do the first release. If this sounds interesting to you, join the community. You can find an entry point here. Amiko’s primary goal is to provide an LTS version of Rails 8.x built and maintained by a community of people that do not tolerate nazis, transphobes, racists, or any kind of bigotry. The idea is that if you have an existing Rails 8.x application, you switch out the gems, do a few search and replace operations, and your app is ready to go. We want Amiko to be boring and friendly.
目前,我们已经在 Matrix 上建立了一个非常好的社区,并对分叉的工作方式进行了初步探索。目前的名称是 Amiko,但在我们发布第一个版本之前可能会更改。如果你觉得这很有趣,欢迎加入社区。你可以在这里找到入口。Amiko 的主要目标是提供一个由社区构建和维护的 Rails 8.x LTS 版本,该社区不容忍纳粹分子、跨性别恐惧症者、种族主义者或任何形式的偏见。我们的想法是,如果你有一个现有的 Rails 8.x 应用程序,你只需替换 gem,进行几次搜索和替换操作,你的应用程序就可以运行了。我们希望 Amiko 是无聊且友好的。
Changes / 变更
We might also work on some flaws in Rails if we can do that without breaking compatibility. The asset pipeline comes to mind that has been in a state of absolute chaos of a dozen half-working approaches since the core team lost their frontend knowledge in 2021 when Basecamp imploded. We also discussed how amiko new could work if it wasn’t designed by someone who has not understood that if a chef serves the same meal to everyone, that’s called “fast food” and not “omakase”. But expect little changes to what you already know from Rails 6/7/8.
如果能在不破坏兼容性的前提下,我们可能会着手解决 Rails 中的一些缺陷。我想到了资源管道(asset pipeline),自 2021 年 Basecamp 内部动荡导致核心团队失去前端知识以来,它一直处于十几种半成品方案的混乱状态。我们还讨论了如果 amiko new 不是由那些不明白“如果厨师给每个人提供同样的饭菜,那叫‘快餐’而不是‘主厨推荐(omakase)’”的人设计,它会是什么样子。但请不要期待对你从 Rails 6/7/8 中所熟知的内容有太大改动。
Why not Hanami? / 为什么不是 Hanami?
Ryan Bigg 写了一篇博客文章,不同意 Amiko 的目标。他建议我们都应该加入 Hanami。在某种程度上,我们确实加入了。我们加入了他们的使命和核心价值观:“Hanami 社区是一个让各种背景和经验水平的人都能感到被尊重、能够分享和成长的地方。一个让人们感到自豪和安全的地方。我们不容忍纳粹分子、跨性别恐惧症者、种族主义者或任何形式的偏见。” 像 Tim Riley 一样,我们希望 Ruby 成为一个繁荣的生态系统,而不是单一文化。请观看他那场真正激励了我的精彩主题演讲。
Ryan Bigg wrote a blog post that disagrees with Amiko’s goal. He suggested that instead we should all join Hanami. And in a way we do. We join them in their mission and core values: “The Hanami community is a place where people of all backgrounds and experience levels can feel respected, and can share and grow. A place for people to be proud of, and feel safe within. We do not tolerate nazis, transphobes, racists, or any kind of bigotry.” Like Tim Riley, we want Ruby to be a thriving ecosystem, not a monoculture. Please watch his excellent keynote that really inspired me.
在我们看来,完美的任务队列可以与 Amiko、Hanami 和 Roda 一起工作。我们将自己视为众多绝佳选择中的另一个替代方案。我们希望 Amiko 成为那些拥有大型 Rails 应用程序、无法“直接用 Hanami 重写”,或者喜欢 Rails 的设计但不喜欢其领导层的人们的绝佳选择。如果你想要一种与 Rails 完全不同的设计,我鼓励你去看看 Hanami 社区的杰出工作。如果你想要一个带有服务器端逻辑添加选项的优秀静态网站生成器,请查看 Bridgetown(例如,我就是用它来制作这个网站的)。如果你想将 Amiko 作为 Web 框架,Rom 作为数据层,并用 Dry::Operation 组织业务逻辑,那么你已经拥抱了“okonomi”(随心所欲)。
In our view, the perfect job queue works with Amiko, Hanami, and Roda. We see ourselves as another alternative among many awesome choices. And we want Amiko to be an especially great choice for everyone who has a big Rails app that they can’t “just rewrite in Hanami” or that like the design of Rails, but not their leadership. If you want a completely different design than Rails, I encourage you to check out the awesome work of the Hanami community. If you want an awesome static site generator with the option of adding server side logic, check out Bridgetown (which I use for this website, for example). And if you want to mix and match with Amiko as the web framework, Rom as your data layer and organize your business logic with Dry::Operation, you have embraced okonomi.
Conclusion / 结论
I hope we can all thrive together. We want to add a choice to the Ruby ecosystem, and join the other groups that want to build for a community of people of all genders, skin colors, sexual orientations, experience levels and backgrounds. We want nazis, transphobes and racists to run away screaming and will kick them out if they don’t. And we want to continue building our web applications without feeling icky.
我希望我们都能共同繁荣。我们希望为 Ruby 生态系统增加一个选择,并加入其他致力于为各种性别、肤色、性取向、经验水平和背景的人们构建社区的团体。我们希望纳粹分子、跨性别恐惧症者和种族主义者尖叫着逃离,如果他们不走,我们也会把他们踢出去。我们希望继续构建我们的 Web 应用程序,而不会感到恶心。
Thanks / 致谢
Thanks to Bodo and Dirk for their feedback ❤️
感谢 Bodo 和 Dirk 的反馈 ❤️