Articles with the tag "web-development"

Go's 1.22+ ServeMux vs Chi Router

In Go 1.22 the ServeMux was updated to be significantly easier to use for building web applications. Supported was added for HTTP methods, variables in URL paths, and more. In this article we discuss how it stacks up to some third party libraries that have existed in the Go ecosystemf or a while.

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.

Flat Application Structure in Go

Rather than spending time trying to figure out how to break code into packages, an app with a flat structure would just place all of the go files in a single package. This sounds kinda crazy, but can actually be a great facilitator of learning and letting code evolve into a better final state.

JSON APIs Are Just Web Applications

A common misconception is that a JSON API is vastly different from a web application that renders server-side HTML. In this article we explore how to convert an HTML-based web app into a JSON API in order to demonstrate how similar the two really are in a well designed app.

Why Cant I Pass This Function as an Http Handler?!

An incredibly common question I get when helping people learn web development is, "Why can’t I pass this handler function into a function that expects an http.Handler?" It is a logical question. The compiler can automatically convert those functions into the http.HandlerFunc type, so why can't it take the next step and infer that it also implements the Handler interface? Learn why (and more) in this article!

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.