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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Replacing Ruby on Rails: Let's Go

125 点作者 zgryw大约 10 年前

19 条评论

colbyh大约 10 年前
I like Ruby&#x2F;Rails, I like Go. I like frameworks that make your life easier when starting a new project.<p>I don&#x27;t think Go is anywhere near the list of languages to build a Rails successor on top of. Rails can do so much of the cool stuff it does because Ruby is an incredibly flexible language.<p>Go, on the other hand, could be described as &quot;inflexible as a feature&quot;. You have a beautifully simple language that optimizes for concurrency and other issues that simply aren&#x27;t considerations in the Ruby world.<p>The two languages are worlds apart and designed to solve vastly different problems. I support new tools for Go, but I just don&#x27;t see a monolithic web framework being high up on the list of &quot;must haves&quot;.
评论 #9427973 未加载
评论 #9427950 未加载
评论 #9428337 未加载
tptacek大约 10 年前
I&#x27;ve had nothing but bad experiences trying to do things I&#x27;d ordinarily do in Rails in Golang instead (and I really like Golang). Writing &quot;Rails apps&quot; in Golang feels a like like writing them in Sinatra used to feel: good at first, but halfway through you realize you&#x27;re just wasting time reimplementing a buggier version of half of Rails.<p>On the other hand, I&#x27;ve had very good experiences factoring subsets of Rails apps out into trivial HTTP&#x2F;JSON services, and frontending them with Rails. That&#x27;s how Microcorruption.com works, for instance.
评论 #9428273 未加载
评论 #9428212 未加载
评论 #9428451 未加载
评论 #9428504 未加载
jweir大约 10 年前
I like Go, and I am replacing aspects of Rails apps with Go, but for a lot of web app uses, Rails is really, really good.<p>Hashicorp, who has a very high Go competence, migrated away from Go to Rails for their web service.<p><a href="http:&#x2F;&#x2F;blog.gopheracademy.com&#x2F;advent-2014&#x2F;atlas&#x2F;" rel="nofollow">http:&#x2F;&#x2F;blog.gopheracademy.com&#x2F;advent-2014&#x2F;atlas&#x2F;</a><p>&gt; Once we decided to evaluate other technologies for our web service, we had a few choices. Based on having Rails experience and the maturity of that tooling we saw it as the most pragmatic option. As we began our initial port, we realized that over two weeks worth of work in Go had been replaced in just a few hours in Rails. We were sold.
评论 #9428288 未加载
BringTheTanks大约 10 年前
Odd. RoR and Go address entirely different app domains.<p>The only thing that connects them is that RoR was trendy yesterday, and Go is trendy today.<p>If this is the rationale for replacement, the author will be writing plenty of &quot;replacing&quot; articles in the years forward.
评论 #9428728 未加载
评论 #9428315 未加载
shah_s大约 10 年前
Rails is still the best framework for building CRUD applications. It shouldn&#x27;t be used for every scenario but if you want to build a traditional CRUD app, nothing is better than Rails in my opinion.
评论 #9428258 未加载
hkarthik大约 10 年前
I&#x27;m surprised he chose to use Martini for the web component since the author himself has chosen to discontinue development of Martini in favor of a different approach with Negroni.<p>These days most people I know that use anything outside of the Golang stdlib seem to reach for Gin.
评论 #9428119 未加载
评论 #9428924 未加载
buro9大约 10 年前
One of the things I still think Go is weak at is the internationalisation and localisation.<p>There is nothing as feature-rich and widely adopted as the Django equivalents for translation <a href="https:&#x2F;&#x2F;docs.djangoproject.com&#x2F;en&#x2F;1.8&#x2F;topics&#x2F;i18n&#x2F;translation&#x2F;" rel="nofollow">https:&#x2F;&#x2F;docs.djangoproject.com&#x2F;en&#x2F;1.8&#x2F;topics&#x2F;i18n&#x2F;translatio...</a> formatting of dates and times <a href="https:&#x2F;&#x2F;docs.djangoproject.com&#x2F;en&#x2F;1.8&#x2F;topics&#x2F;i18n&#x2F;formatting&#x2F;" rel="nofollow">https:&#x2F;&#x2F;docs.djangoproject.com&#x2F;en&#x2F;1.8&#x2F;topics&#x2F;i18n&#x2F;formatting...</a> or for handling timezone conversions <a href="https:&#x2F;&#x2F;docs.djangoproject.com&#x2F;en&#x2F;1.8&#x2F;topics&#x2F;i18n&#x2F;timezones&#x2F;" rel="nofollow">https:&#x2F;&#x2F;docs.djangoproject.com&#x2F;en&#x2F;1.8&#x2F;topics&#x2F;i18n&#x2F;timezones&#x2F;</a> .<p>Ideally the Go core, or the Go community, would provide a great experience (consistent, idiomatic, documented, supported) for developers coming from Rails, Django and other platforms.<p>Right now I recommend Go for backend and APIs, but I stop short of recommending replacing your Rails or Django with Go. There&#x27;s still an enormous amount of work you would have to do to come close to the kind of web app support you&#x27;ll find in platforms that are already mature and focused on delivering front-end web experiences.
eranation大约 10 年前
If you come from RoR, Go is the last language&#x2F;ecosystem I would think of. Elixir, Scala&#x2F;Play seems to me so much more naturally fitting the Rails paradigm and the Ruby language flexibility. Go is so much different, it&#x27;s not replacing Ruby on Rails, it&#x27;s replacing your programming style and philosophy completely.
knodi大约 10 年前
I like Ruby&#x2F;Rails I like Go. I use Go for all backend stuff but as a web framework Rails is miles better than anything on Go currently. E.g: templating in Go...no thx
deedubaya大约 10 年前
There is a tool for every job, and not every tool is a hammer.<p>&quot;Framework XYZ can&#x27;t do ABC, I&#x27;m switching&quot; never holds any water.
Freaky大约 10 年前
So what&#x27;s around that has a chance of replacing Wordpress? Java!<p>Sigh.
评论 #9428056 未加载
CookWithMe大约 10 年前
&gt; Simply &quot;not using Rails&quot; anymore however is, well, not that simple!<p>After the OP has described why he likes Rails (&quot;good toolset&quot;, &quot;Ruby gems cover everything&quot;), I would&#x27;ve really liked to know why OP wants to switch away from Rails.<p>&gt; so what&#x27;s around that has a chance of replacing Rails? Go!<p>Again, the OP gives no reason why he switched to Go instead of looking at another web framework for Ruby, and also not why he chose the particular Go frameworks to replace Rails.<p>That&#x27;s what would&#x27;ve really interested me, after the introduction I didn&#x27;t quite see a Go-tutorial coming...
minaandrawos大约 10 年前
If you are set to learn Go. Martini -though powerful- is not the most idiomatic. Why not try the gorilla toolbox instead? <a href="http:&#x2F;&#x2F;www.gorillatoolkit.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.gorillatoolkit.org&#x2F;</a>. The maker of Martini wrote an interesting post last year: <a href="http:&#x2F;&#x2F;codegangsta.io&#x2F;blog&#x2F;2014&#x2F;05&#x2F;19&#x2F;my-thoughts-on-martini&#x2F;" rel="nofollow">http:&#x2F;&#x2F;codegangsta.io&#x2F;blog&#x2F;2014&#x2F;05&#x2F;19&#x2F;my-thoughts-on-martini...</a>
wukerplank大约 10 年前
When talking about Rails, you can&#x27;t take Ruby out of the equation. To me, the joy of coding Ruby is unmatched by any other language. And it does have a very mature ecosystem.<p>Ruby and Go are both awesome, I could write you a love letter about both of them. But in my mind they have way too different use cases and coding styles to be brought up in the same sentence.
kaushikt大约 10 年前
the author has not written a single good reason why he has moved from Rails to Go. Could you please enlighten ?
tinganho大约 10 年前
I don&#x27;t know why this post got so many likes? Many Go fans here?<p>I personally think any language that compiles to JavaScript and are quite similar are the perfect language for web. Since you can re-use code from client and the server. Right now my bet is TypeScript.
whateveracct大约 10 年前
Go seems like a terrible choice for any programming problem that requires data modeling&#x2F;manipulation. Basic structs, slices+maps, and loops are all you have.<p>Go is good at plenty of things, but building abstractions is not one of them.
评论 #9428796 未加载
matt2000大约 10 年前
I never personally learned Rails so I&#x27;m just an interested observer, but can someone explain the problems with Rails currently? And why the switch in language rather than just making fixes to the framework? After looking through the article it doesn&#x27;t seem like there was a very strong case made for Go. Thanks!
评论 #9429070 未加载
seanschade大约 10 年前
The library author for Gorm should have done a quick Google search first. Grails has had Gorm has an ORM for years.
评论 #9430120 未加载