12 ms·
Is there currently a good web framework for Go? Edit: web.go looks pretty sweet: http://www.getwebgo.com/ http://www.getwebgo.com/ Edit2: As does app.go: http
by firefoxman1 15y ago
Is there currently a good web framework for Go?
Edit: web.go looks pretty sweet: http://www.getwebgo.com/ http://www.getwebgo.com/
Edit2: As does app.go: https://github.com/georgenava/appgo https://github.com/georgenava/appgo
...There's a large list of Go projects here: http://godashboard.appspot.com/project http://godashboard.appspot.com/project
- zemo 15y agounlike other languages, a framework isn't as much of a requirement in Go since the Go standard library includes an http server, json serialization/deserialization, html templating, email, logging, basically everything you need in a web app. The url routing is pretty crappy, but that's my only real gripe. ngmoco's Falcore is worth looking at: https://github.com/ngmoco/falcore https://github.com/ngmoco/falcore
- drivebyacct2 15y agoGorilla's mux adds much more capable and advanced routing. It's really nice to use it with subroutes, etc. Again, dead simple partly because it's designed well and partly because Go makes it easy to build. http://gorilla-web.appspot.com/pkg/gorilla/mux/ http://gorilla-web.appspot.com/pkg/gorilla/mux/ If you want something more lightweight (Gorilla's not "heavy" by any means) there is pat (formerly pat.go) https://github.com/bmizerany/pat https://github.com/bmizerany/pat
- enneff 15y ago> Is there currently a good web framework for Go? The standard library gives you almost everything you need. The http package provides a web server and client: http://weekly.golang.org/net/http/ http://weekly.golang.org/net/http/ The template package provides text templates: http://weekly.golang.org/text/template/ http://weekly.golang.org/text/template/ and automatically-escaped HTML templates: http://weekly.golang.org/html/template/ http://weekly.golang.org/html/template/ For other bits and pieces, see the rest of the standard library: http://weekly.golang.org/ http://weekly.golang.org/ I also recommend the Gorilla Web Toolkit for some other useful web-app functionality: http://gorilla-web.appspot.com/ http://gorilla-web.appspot.com/
- 4ad 15y agoYup, the standard library was all I ever needed. People from other languages are familiar with frameworks and seek them in Go, but I'd say they are seldom required. The rich standard library and the language makes everything easy.
- dhaivatpandya 15y agoI've used web.go successfully before; its quite nice.
- firefoxman1 15y agoWhat's it like to use a compiled language for a web server?
- BarkMore 15y agoBecause the Go compiler and linker are so darn fast, the extra compilation step is just a blip. It's not like working with Java or C++.
- enneff 15y agoIt's really nice. You can build your Go program, deploy it as a single binary and it just runs. No need to hide it behind nginx or some other dedicated web server. The Go http package is DoS hardened and very fast. It's refreshing how little mechanism there is.
- stock_toaster 15y agoHow are the database libraries (postgres/mysql) these days? Last time I poked around (been a while) it seemed like most of them were pretty beta yet.
- enneff 15y agoThere's the new database/sql library (http://weekly.golang.org/database/sql http://weekly.golang.org/database/sql), which is a general SQL interface backed by various driver implementations (http://code.google.com/p/go-wiki/wiki/SQLDrivers http://code.google.com/p/go-wiki/wiki/SQLDrivers).
- stock_toaster 15y agoGood to see that has improved quite a bit. Thanks!
- jbarham 15y agoNote that there is experimental support for Go on App Engine (http://code.google.com/appengine/docs/go/overview.html http://code.google.com/appengine/docs/go/overview.html) and the beta versions are tracking the Go 1 changes pretty closely.
- jff 15y agoA simple server for static files and blog posts: https://bitbucket.org/floren/goblog https://bitbucket.org/floren/goblog It uses only the packages which ship with Go, with the exception of a Markdown parser. Unfortunately, it's written for an ~6 month old release of Go on Plan 9, but you can get the general idea of building Go web stuff. The code's a bit ugly too, but it does work.