Articles with the tag "mvc"

Structuring Web Applications in Go

In this series we explore how you might structure an application written in Go. We start by examining why it is so hard for everyone to just agree on a universal structure, and then dive into a few various options looking at the pros and cons of each. By the end you should have a solid understanding of how to go about deciding what structure is best for your context when you start your next application in Go. We will mostly focus on web applications, but the overall message applies for almost all apps written in Go.

Using MVC to Structure Go Web Applications

MVC is a well-known way to structure web applications, but it is often shunned in Go. In this article we explore how MVC can be effectively implement in Go as well as how to avoid all of the issues that many people associate with MVC.

An Introduction to Templates in Go

This four part series explores Go's template package, which can be used to render HTML or text. Topics covered include contextual encoding, actions, using functions in templates, and how to build a proper view layer for a web application.

Creating the V in MVC

Learn how to create a reusable view layer to simplify HTML rendering. This includes creating a shared layout, defining default templates that can be overridden, and including the same templates across various pages without putting all of the code into a single file.

Controllers and Views in Go

Chances are a lot of developers who pick up Go will be familiar with the MVC model. Models, views, and controllers are great for abstracting away code, but sadly there aren’t many examples of how to use them in Go. In this post I am going to go over how to get started with a basic controller and view in Go, and cover a really simple web application that uses them.

Avatar of Jon Calhoun
Articles and Tutorials by
Jon Calhoun

Jon Calhoun is a full stack web developer who also teaches about Go, web development, algorithms, and anything programming related. He also consults for other companies who have development needs. (If you need some development work done, get in touch!)

Jon is a co-founder of EasyPost, a shipping API that many fortune 500 companies use to power their shipping infrastructure, and prior to founding EasyPost he worked at google as a software engineer.

Jon's latest progress update: Writing Course Notes

Recent Articles All Articles Mini-Series Progress Updates Tags About Me Go Courses

©2018 Jonathan Calhoun. All rights reserved.