6 ms·
I've just started learning Ruby on Rails but Go I'm thinking about Go more often and am curious about working with it. Are there Rails-like frameworks for Go?
by criddell 10y ago
I've just started learning Ruby on Rails but Go I'm thinking about Go more often and am curious about working with it.
Are there Rails-like frameworks for Go? Why I try to Google that, I find lots of stories about people switching from Rails to Go, but not a lot of frameworks discussions.
- commentzorro 10y agoThere are a couple vaguely Rails like frameworks but Go definitely doesn't lend itself to immersing itself into a web framework like that. Overall they tend to be much lighter and sit closer the the Go core language itself. Here's a good list of the major frameworks for Go. https://github.com/avelino/awesome-go#web-frameworks https://github.com/avelino/awesome-go#web-frameworks Also, the complete Awesome Go list is a wonderful resource for browsing some of the best Go libraries out there.
- deleted 10y ago[deleted]
- oelmekki 10y agoHi criddell, I switched from ruby (and rails) to golang this year as my main language. If you're thinking "I'm hesitating between ruby on rails and golang", you should probably go with ruby on rails (no pun intended). Golang is more low level, and it expects you prefer conceptual simplicity over abstraction [EDIT: this is why you won't see prominent golang rails-like framework]. This also means you're supposed to already know how to architecture a web application (if that's what you want to do) and to know the techs behind it. You mention you started to learn RoR, but do you have previous and consequent experience with web development? If not, definitely use RoR, it will provide clear guidelines about how to build a web app.
- criddell 10y agoI haven't done a lot of web stuff. My day is spent mostly up to my neck in C++. I think I'm going to keep plugging away at Rails. If I ever reach a point where scale is becoming an issue, then I've got a great problem to have.
- aikah 10y ago> Are there Rails-like frameworks for Go? Why I try to Google that, I find lots of stories about people switching from Rails to Go, but not a lot of frameworks discussions. The definitive answer is no. It's no because given Go's type system it is impossible to create a framework like Rails while staying type safe. One could create something that involves a lot of reflection tricks but you'd loose type safety. The alternative would be code generation + DSL but why use Go at first place if you end up relying on a complex DSL that needs to be compiled to Go first ? it doesn't make sense. The best you'll get with Go are Sinatra or Flask clones. But Rails? no way. If you want the Rails experience use Rails. Go is more verbose and more rigid than Ruby anyway.