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 teaches about Go, web development, algorithms, and anything programming. If you haven't already, you should totally check out his Go courses.

Previously, Jon worked at several statups including co-founding EasyPost, a shipping API used by several fortune 500 companies. Prior to that Jon worked at Google, competed at world finals in programming competitions, and has been programming since he was a child.

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

©2018 Jonathan Calhoun. All rights reserved.