This is why I always make config files for my projects that contain usernames and passwords, add that config to the .gitignore and then create a sample_config with the blank version. I learned to do this after one or two commits containing sensitive data. =)
Also, simply using net/http or Gorilla to piece things together.
I'm quite happy with go-restful and AngularJS for the frontend and hood for a lightweight ORM (though I'm not completely sold on that. DAO is always awkward for me).
Model-View nonsense? A model is a business object (ie: your data and the stuff it does) and your views are how you format your business objects for various kinds of output. That's the gist of it.
I have been eyeing beego for a while, and will probably give it a try very soon. (well beego hasn't been out for long, but have kept it in my head of web frameworks to try since I've seen it :P)
I would love to hear what other "no-magic" frameworks people in the community enjoy developing in. Web.py comes to mind, for example - though I've never worked with it.
I'm curious too. I would love to see someone make nearly an exact clone of Express (the sinatra inspired lib for Node) but for Go.
Basically something that supports the concept of:
- Arbitrary middleware as long as you adhere to a specific signature.
- Proper caching at the http request/response level for dynamic templates.
- Keep the router separate so you can plugin Pat or the Gorilla Muxer (both of them are much different IMO).
- Add some niceties like setting proper headers for certain popular responses (json or templates, etc.) or easily distinguishing if the request is an XHR or not so you can either render a template or json with a quick boolean check.
- Implement Gorilla's session handler or some other solution and expose it in a really clean way that's also easy to plugin different session adapters (app memory, redis, etc.).
- Some functionality of what "res.locals" does in Express.
I honestly feel like part of the reason why Node is so popular is because of Express. tj did a tremendous job making a very out of the way but ridiculously useful web library.
I wish there were some examples- why is this better than "net/http" + Gorilla?
Why the focus on postgres? They talk about using a postgres driver that conforms to "database/sql". But that should mean you could use a mysql "database/sql" compatible driver like the one provided by mymysql (https://github.com/ziutek/mymysql), with no code changes to your project...
This is a framework that cuts the unnecessary metaprogramming and sugar that has been obscuring architecture and slowing code for years. There are no helpers. I called it a framework for ironic effect, however it is a framework - an extremely minimilist one, a program that fetches data and serves requests, and renders data.
Other Go web frameworks are like houses of cards, while this one is like a computer monitor. The cards can be knocked over, but the computer monitor is 27".
Forthcoming features for Gooo v2:
- more speed
- faster
- documentation
- quicker
- higher rate of movement
Eventually: integrating a persistent key-value store
There are many reasons why someone should choose Go, but "Hip, New, Unproven" aren't any of them. It isn't even unproven. Actually it has proven itself successful in production many times.
28 comments
[ 3.2 ms ] story [ 58.2 ms ] threadhttps://github.com/aaronlifton/Gooo/blob/master/model/model....
Still available ;)
Follow this guide to totally erase it and optionally get rid of those commits where you took it out:
https://help.github.com/articles/remove-sensitive-data
Also, simply using net/http or Gorilla to piece things together.
I'm quite happy with go-restful and AngularJS for the frontend and hood for a lightweight ORM (though I'm not completely sold on that. DAO is always awkward for me).
It doesn't feel like idiomatic Go to me, which for me is a big deal. Perhaps if I start running into problems using only net/http I'll change my mind.
Will be sure to give revel another try in that case, but it looks like I'll like goooo's approach more.
I would love to hear what other "no-magic" frameworks people in the community enjoy developing in. Web.py comes to mind, for example - though I've never worked with it.
Basically something that supports the concept of:
- Arbitrary middleware as long as you adhere to a specific signature.
- Proper caching at the http request/response level for dynamic templates.
- Keep the router separate so you can plugin Pat or the Gorilla Muxer (both of them are much different IMO).
- Add some niceties like setting proper headers for certain popular responses (json or templates, etc.) or easily distinguishing if the request is an XHR or not so you can either render a template or json with a quick boolean check.
- Implement Gorilla's session handler or some other solution and expose it in a really clean way that's also easy to plugin different session adapters (app memory, redis, etc.).
- Some functionality of what "res.locals" does in Express.
I honestly feel like part of the reason why Node is so popular is because of Express. tj did a tremendous job making a very out of the way but ridiculously useful web library.
Why the focus on postgres? They talk about using a postgres driver that conforms to "database/sql". But that should mean you could use a mysql "database/sql" compatible driver like the one provided by mymysql (https://github.com/ziutek/mymysql), with no code changes to your project...
Other Go web frameworks are like houses of cards, while this one is like a computer monitor. The cards can be knocked over, but the computer monitor is 27".
Forthcoming features for Gooo v2: - more speed - faster - documentation - quicker - higher rate of movement
Eventually: integrating a persistent key-value store
----------------------------------->