Live data from Hacker News

Gadget: A smallish web framework for Go

redneckbeard.github.io

1–10 of 52 posts

Re: Gadget: A smallish web framework for Go

#3
post #2

Looks smart! Curiously, any reason you chose not to use Revel?

Two reasons:

1) I didn't want routes in a text file. This is whiny, I know. Just a personal preference. 2) Go is the only programming language that has held my attention long enough to actually finish a fairly usable framework. Writing a framework is a good exercise in software design, so I felt like I had to use the opportunity.

Re: Gadget: A smallish web framework for Go

#5
Unlike Revel, you don't seem to have watch setup for .go files, which make sense since you want to keep it smallish. Curious on how other gopher trigger app restart from their editor of choice. Anyone have insight for setting up VIM+Tmux for Golang development that enable app restart from single key press? Sample .vimrc will be great.

Re: Gadget: A smallish web framework for Go

#7
post #2

Looks smart! Curiously, any reason you chose not to use Revel?

Two reasons: 1) I didn't want routes in a text file. This is whiny, I know. Just a personal preference. 2) Go is the only programming language that has held my attention long enough to actually finish a fairly usable framework. Writing a framework is a good exercise in software design, so I felt like I had to use the opportunity.

I totally agree with you on routes in a text file. Are you gonna go 'batteries included' with Gadget, or keep aiming for that middle ground?

I ask because I am looking to put my weight behind a framework and am undecided, but not at all attracted to Revel...

Re: Gadget: A smallish web framework for Go

#9
post #7

Earlier quoted context omitted.

Two reasons: 1) I didn't want routes in a text file. This is whiny, I know. Just a personal preference. 2) Go is the only programming language that has held my attention long enough to actually finish a fairly usable framework. Writing a framework is a good exercise in software design, so I felt like I had to use the opportunity.

I totally agree with you on routes in a text file. Are you gonna go 'batteries included' with Gadget, or keep aiming for that middle ground? I ask because I am looking to put my weight behind a framework and am undecided, but not at all attracted to Revel...

I would like to go something like "batteries included but not installed." The User interface I have now is a good example of what I mean -- I would prefer to keep everything built around implementing an interface, but it might be nice to provide an "official" authentication implementation as a subpackage.

I've started writing subpackages as they become important to me. The most useful thus far is probably gadget/forms, which is very much inspired by Django forms. I prefer a data validation layer that is independent from or at least very loosely coupled to a model layer.

Re: Gadget: A smallish web framework for Go

#10
post #5

Unlike Revel, you don't seem to have watch setup for .go files, which make sense since you want to keep it smallish. Curious on how other gopher trigger app restart from their editor of choice. Anyone have insight for setting up VIM+Tmux for Golang development that enable app restart from single key press? Sample .vimrc will be great.

I use Grunt [1] and (especially) grunt-contrib-watch [2] for this. Using Grunt also has the benefit of automatically recompiling CSS files and/or concatenating JS files etc. But your mileage may vary, of course.

[1] http://gruntjs.com/ [2] https://github.com/gruntjs/grunt-contrib-watch

Post reply on HN