March 2016: Web apps
Please RSVP at Meetup or Google+.
We get things started at 6:30 pm.
Sponsors
Food provided by Bellstone Engineering.
Venue provided by Startup Edmonton.
eBook Giveaway from Manning Publications:
- Generative Art by Matt Pearson
- Grokking Algorithms by Aditya Y. Bhargava
- Learn Go by Nathan Youngman
Talks
Shopping is hard, let's build a web app
Chris Olsen walked through what it actually takes to build a working web API in Go, drawing on his experience as a web developer. He argued Go is a good fit — it's fast, compiles to a single executable, and doesn't need a separate HTTP server — but noted there's no de facto standard framework, so you have to choose your own components. He compared raw net/http route handling and middleware chaining with router-based alternatives, then showed the stack he settled on: the Gin router with a controllers/models/services project layout. He stressed the single responsibility principle — keep logic in services rather than models, avoid global service references, and let controllers handle requests and permissions before delegating. The talk also touched on JWT authentication, the JSON API payload specification, and an approach to testing that exercises handler functions directly with httptest.NewRecorder.
Key points:
- Go is fast, compiles to one binary, and needs no external web server.
- There's no standard web framework, so component choices matter.
- Gin provides routing, middleware, and request context in one package.
- Controllers → services → models; keep business logic out of models.
- Wrapping external services in types avoids globals and eases testing.
- JWT and the JSON API spec give consistent auth and payloads.
- Black-box endpoint tests via
httptest.NewRecorderare the default approach.
Video: Dependency Management
Video: Dependency Management by William Kennedy
William Kennedy goes through different approaches to managing dependencies for Go, using tools like gb and govendor. Another tool worth checking out is gvt.
Events
- Monthly Hack Day - March 5 (Registration required)
- Edmonton Go Meetup - April