Web applications have been around in one form or another since the beginning of the World Wide Web in the mid-1990s. They started by only delivering static web pages but soon escalated and evolved into a dizzying variety of dynamic systems delivering data and functions. My own journey in developing applications for the web started around the same time, in the mid-1990s, and I eventually spent the larger part of my professional career designing, developing, and managing teams in developing largescale web applications. Over the same period of time, I have written web applications in numerous programming languages and using various frameworks including Java,
Ruby, Node.js, PHP, Perl, Elixir, and even Smalltalk. I stumbled on Go a few years ago, and what worked very well for me is the simplicity
and refreshing directness of the language. I was even more impressed when I realized that I could quickly write complete web applications (and services) that are fast and scalable with only the Go standard libraries. The code is direct, easy to understand, and can be quickly and easily compiled into a single deployable binary file. I no longer need to throw in application servers to scale or to make my web application production-capable. Needless to say, all of these elements made Go my new favorite language for writing web applications.
Writing web applications has changed dramatically over the years, from static content to dynamic data over HTTP, from HTML content delivered from the server to client-side single-page applications consuming JSON data over HTTP. Almost as soon as the first web applications were written, web application frameworks appeared, making it easier for programmers to write them. Twenty years on, most programming languages have at least one web application framework—and many have dozens—and most applications written today are web applications.
While the popular web application frameworks made it easier to write web applications, they also concealed a lot of the underlying plumbing. It became increasingly common to find programmers who don’t even understand how the World Wide Web works writing web applications. With Go I found a great tool to teach the basics of web application programming, properly. Writing web applications is direct and simple again. Everything’s just there—no external libraries and dependencies. It’s all about HTTP again and how to deliver content and data through it. So with that in mind, I approached Manning with an idea for a Go programming language book that focuses on teaching someone how to write web applications from the ground up, using nothing except the standard libraries. Manning quickly supported my idea and green-lighted the project. The book has taken a while to come together, but the feedback from the early access program (MEAP) was encouraging. I hope you will gain much and enjoy reading this book as much as I enjoyed writing it.