Live data from Hacker News

Gadget: A smallish web framework for Go

redneckbeard.github.io

31–40 of 52 posts

Re: Gadget: A smallish web framework for Go

#31

Earlier quoted context omitted.

>It may seem old-fashioned but when I load a web page I don't want to sit looking at a 'loading' message or a progress bar This is how bad implementations look to users, consider something like Gmail as a counter example however... >would be interesting to hear the reasons behind the string of assertions in your penultimate sentence Sure:) >are you sure all types of app would benefit equally from your approach? Of co…

Thanks for the comments, it'd be easier to read if they weren't styled using pre! Of course I am not, I didn't make a that claim. Sorry, I should have phrased that differently as something like - perhaps not all types of app would benefit equally? I wasn't trying to put words in your mouth. I do think it's a little early to start asking why anyone would use server-side logic any more, there is room for both approache…

I think we agree more than we disagree. Maybe we just differ on which approach is our default one. I dislike JS as well and will be switching to Dart on the front end when I feel it is ready.

>though it is possible to have a back-end behind a traditional web framework too.

Sure I think you get a lot of the maintainability pro's this way, but loose on some of the performance ones.

I mostly write systems software (in Go), but when I write webapps I use angular.js (frontend) + Go (backend) + One of many datastores (ex MySQL, Postgre, LevelDB etc)

Re: Gadget: A smallish web framework for Go

#32

Earlier quoted context omitted.

I just don't understand the argument that we should all just use HandlerFuncs for everything. Python and Ruby have stdlib HTTP facilities that are pretty good. They aren't nearly as nice as net/http, but you could totally build websites with them. People still have written lots of web frameworks, because it makes their lives easier. It lets them express programs in a simpler, higher-level way. I feel like this is eve…

> feel like this is even more valid now in 2013 since nearly anyone who's building websites has done so with one of those high-level frameworks, and they expect a similar experience. But in 2013 do I really want to use server side HTML tempalating? Why not just connect a webservice to a HTML/JS presentation layer like I am suggesting? If all you are doing is building a webservice then the abstractions beyond net/http…

Why do folks downvote civil open-minded discussion? I always assumed downvotes were for bad behavior or trolling. Is there an official position on the use of downvotes?

Re: Gadget: A smallish web framework for Go

#33
post #4
post #2

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

Or martini? I liked the look of martini but have not delved deep enough to make an informed decision. Might pick Go for my next side project...

Just came back from a go meetup where I met the developer of martini actually, I think it's a really well thought-out framework :)

Re: Gadget: A smallish web framework for Go

#34

Earlier quoted context omitted.

I just don't understand the argument that we should all just use HandlerFuncs for everything. Python and Ruby have stdlib HTTP facilities that are pretty good. They aren't nearly as nice as net/http, but you could totally build websites with them. People still have written lots of web frameworks, because it makes their lives easier. It lets them express programs in a simpler, higher-level way. I feel like this is eve…

> feel like this is even more valid now in 2013 since nearly anyone who's building websites has done so with one of those high-level frameworks, and they expect a similar experience. But in 2013 do I really want to use server side HTML tempalating? Why not just connect a webservice to a HTML/JS presentation layer like I am suggesting? If all you are doing is building a webservice then the abstractions beyond net/http…

I'm not sure that angular apps are quicker to develop for the average internal application yet, for example. The primary issue is that we haven't quite figured out patterns to handle business logic via web service in a way that doesn't duplicate effort on server and client side. At least, I haven't seen it yet.

Re: Gadget: A smallish web framework for Go

#35
post #22

Earlier quoted context omitted.

Have you seen Martini? https://github.com/codegangsta/martini

I'm kind of amazed at the SLOC, ~600 lines for the whole thing. Flask is much bigger and depends on Werkzeug (~20K?), heck even Bottle doesn't come in under 1,000 lines. That is incredibly attractive.

bottle.py might be a better Python comparison, since they're more concerned about being small & standalone.

Re: Gadget: A smallish web framework for Go

#36
Damn, routers and controllers are not an issue in Go, models — is. I belive, that rich middleware between rich backend and rich client does matter. It isn't manipulating with html views, it's working with data. It's a proxy layer. And unfortunately, I don't see it in the modern Go web frameworks. Anyway, it's a great job.

Re: Gadget: A smallish web framework for Go

#37
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.

Recompiling and restarting the server has yet to become a bottleneck in development for me, or at least it hasn't caused enough friction or irritation to compel me to add something using fsnotify or other solutions. If you told me that you were very interested in using the framework but the lack of this feature was a barrier to adoption, I'd definitely think harder about it.

I've recently used Russ Cox's devweb for this:

https://code.google.com/p/rsc/source/browse/devweb/

Re: Gadget: A smallish web framework for Go

#38

As a fan of Flask/Bottle/Sinatra/Express style web frameworks I miss a Go framework that works in a similar fashion. Don't know of any better way to prototype APIs so quickly and with such a small mental effort. Edit: Just discovered [Martini]( https://github.com/codegangsta/martini ), that's exactly what I wanted.

Have you seen Martini? https://github.com/codegangsta/martini

+1 for Martini. Spent some time looking for a decent framework like this, and was delighted when I discovered it.

Re: Gadget: A smallish web framework for Go

#39
post #22

Earlier quoted context omitted.

Have you seen Martini? https://github.com/codegangsta/martini

I'm kind of amazed at the SLOC, ~600 lines for the whole thing. Flask is much bigger and depends on Werkzeug (~20K?), heck even Bottle doesn't come in under 1,000 lines. That is incredibly attractive.

Checkout Camping (Ruby) & Squatting (Perl). Both are web microframeworks that aim (when minimised) to fit at or under 4K characters.

Here's the squashed versions of...

- Camping (currently 4.031 kb over 55 lines) - https://github.com/camping/camping/blob/master/lib/camping.r...

- Squatting (currently 3.929 kb over 68 lines) - https://github.com/beppu/squatting/blob/master/lib/squatting...

Re: Gadget: A smallish web framework for Go

#40

As a fan of Flask/Bottle/Sinatra/Express style web frameworks I miss a Go framework that works in a similar fashion. Don't know of any better way to prototype APIs so quickly and with such a small mental effort. Edit: Just discovered [Martini]( https://github.com/codegangsta/martini ), that's exactly what I wanted.

Have you seen Martini? https://github.com/codegangsta/martini

Thanks. As a Flask user myself, and sort-of interested in Go, I'm going to take a look at this. Thanks.
Post reply on HN