Build Your Own Web Framework in Go
nicolasmerouze.com
Build Your Own Web Framework in Go
1–10 of 37 posts
Re: Build Your Own Web Framework in Go
#2Re: Build Your Own Web Framework in Go
#3It'll make the "should we throw this code out" discussion WAAAAY easier in five years.
Re: Build Your Own Web Framework in Go
#4 func(http.ResponseWriter, *http.Request)
I started with barebones http, then used gorilla, and later started using negrioni.Any new library with uses this function helps me.
So in the end: you dont need a framework, but libraries are nice.
Note: My api is a simple json based rest service.
Re: Build Your Own Web Framework in Go
#5I kind of disagree with this article. With go its so easy to get started with http that most of the time you dont even need a framework. If you do, most good frameworks use the following function as a common basis: func(http.ResponseWriter, *http.Request) I started with barebones http, then used gorilla, and later started using negrioni. Any new library with uses this function helps me. So in the end: you dont need a…
[0]: https://www.youtube.com/watch?v=yi5A3cK1LNA&list=PLMW8Xq7bXr...
Re: Build Your Own Web Framework in Go
#6In the long run, when you start a web application using packages like "net/http" and the gorilla toolkit, sooner or later it becomes framework-like, because you start to group your code together, you refactor it and make it easiliy extendable _for the app you are writing_. So, every app becomes a framework on it's own. And what I like about Go is the fact, that building such mini framworks is easy, and does not take much time - but the most important aspect is, that you don't need a huge framework that does all the things.
Re: Build Your Own Web Framework in Go
#7Re: Build Your Own Web Framework in Go
#8I kind of disagree with this article. With go its so easy to get started with http that most of the time you dont even need a framework. If you do, most good frameworks use the following function as a common basis: func(http.ResponseWriter, *http.Request) I started with barebones http, then used gorilla, and later started using negrioni. Any new library with uses this function helps me. So in the end: you dont need a…
Re: Build Your Own Web Framework in Go
#9Yes, do make your own framework. And don't leave any documentation either. Hell, invent your own language while you're at it. It'll make the "should we throw this code out" discussion WAAAAY easier in five years.