4 ms·
Go-powered web-services with Rails
- TheOnly92 14y agoI've been writing a web app with Go for the past weeks, and for what I can say is that yes, Go has less magic in it, and if you don't do it right, you'll get a lot of duplicated code. It's not designed from the ground up as a web language so it might not be as suitable to write web apps using Go as other languages, but it's a real pleasure to write in Go.
- stcredzero 14y ago> It's not designed from the ground up as a web language so it might not be as suitable to write web apps using Go as other languages By that logic, Ruby shouldn't be suitable to write web apps either.
- jfaucett 14y agoHis basic point seems to be "use the right tool for the right job", which I think we all can agree with. I've been programming stuff in Go for about half a year now and I'd have to agree with the author - building a website in Go doesn't make much sense, for many of the same reasons building a website in c or java (for me the java process is too slow) doesn't make much sense. On the other hand, the concurrency model is excellent and for services, background processing, doing all kinds of intensive serverside lifting - i.e. traditional java application areas - Go, in my opinion, beats out java and is an excellent tool for the job.
- kkowalczyk 14y agoMy experience is the opposite. I build websites in Go. I find it about as easy as building in Python. Web programming is mostly about filling html templates with data and Go's built-in html template is excellent (on par with Django templates). Comparing Go to C for web dev is ridiculous - no sane person would write the whole thing in C. Even compared to Java Go wins by a huge margin when it comes to speed of development and conciseness of resulting code. I haven't used use Ruby but writing web services in Go I'm as productive as I was in Python (using App Engine or Tornado).
- salimmadjd 14y agoI'd be interested reading further on this. Can I encourage you to post a blog about it.
- stcredzero 14y agoWhat frameworks do you use for this?
- mseepgood 14y agoHis meme-based blogging style is annoying, like reading the article of a 12 year old. Although the subject sounds interesting I didn't finish reading the article.
- shadowmint 14y agowhat? If you didn't read the article, ffs, why are you commenting on it?
- mseepgood 14y agoBecause I think it can be done better next time.
- jandy 14y agoSame here. I found it distracting and tiring, and just not very funny.
- batista 14y agoMeme-based blogging style != in a well written, multi-page article he added 2 meme pictures for fun.
- mseepgood 14y agoIt's 3 three meme pictures. And "hater" or "motherfucker" are words that I expect from children, but not from a grown-up writing a blog post.
- jimm 14y agoSince it says "thanks to PoTe for fixing my terrible english" it sounds like English might not be the author's first language. Perhaps the impact of those words isn't as negative for the author. I think the article would have been better without them, but that didn't get in the way of my appreciation for its technical content.
- benatkin 14y agoWhy accuse all the MVC frameworks in go of copying rails? Rails and django came out at about the same time and since then a similar frameworks for languages like java, php, perl, C#, and groovy have come out.
- nicholassmith 14y agoThere are a number of frameworks that have come out since then that have said "Basically, we're Rails for <X language>" when that might not be the best option for the constraints of the language.
- draegtun 14y agoAnd there were web MVC frameworks before Rails, for e.g. Struts (Java) & Maypole (Perl).
- protomyth 14y agoWebObjects in 1996
- shadowmint 14y agoSo, in nutshell: Build your web apps in something hyper productive like rails to proof of concept them, then find the high load bits and replace them with a go service. Seems like reasonable, if generic advice: prototype quickly, then go back and rebuild in something performant if its successful. Iterate quickly, etc. etc.
- jandy 14y agoThis has been the practice in Ruby for quite a long time (albeit without Go). Usually high load/slow areas are rewritten as a C module. So yeah, sound advice but nothing revolutionary. Go looks nice though.
- godsdead 14y agoNow that is one amazing domain.
- stcredzero 14y ago> I stubbornly believe that efforts to clone Rails in any other programming language (Go included) are just ridiculous. Why? There are other languages that are just as powerful. From a social/community standpoint, Rails does have a big advantage of a large established community with very good dynamics and practices. Neither Ruby nor Ruby on Rails is the be-all or end-all of computation, however. Maybe cloning Rails is ridiculous. What people should strive to do is surpass it.