-
Book Overview & Buying
-
Table Of Contents
Modern REST API Development in Go
By :
In today’s extremely interconnected environment, REST APIs are the lingua franca for different software to communicate with each other. The industry has tried different communication systems in the past, such as SOAP, CORBA, and custom-made solutions, but REST has been the de facto standard. Its simplicity and ability to leverage the underlying technologies, such as the HTTP protocol, have positioned REST as the go-to option for most developers.
REST is a solid option, but REST can be executed with many languages, such as Python, Ruby, PHP, Rust, and so on. But we are going to talk about how to do it with Go, but why Go? Go is a modern, robust, fast, and easy-to-learn language, making it ideal for REST APIs. Its native compilation makes it an amazing candidate for the speed requirement of modern APIs; its strong typing makes it perfect for ensuring safety and robustness in your services, and its simplicity ensures that incorporating new developers, even if they need to learn the language, is not going to become a nightmare.
This book covers REST and Go, but I’m a firm believer in understanding the foundations of things, so we will also discuss topics such as the HTTP protocol used under the hood, cache approaches, observability, security, and much more. It provides you with the skills to develop REST APIs in Go and teaches you why we follow that approach and what the technological concepts are behind it.
I want to focus on the concepts and keep things as simple and close to the Go standard library as possible, covering specialized libraries only when no built-in package provides that for us. However, we will also provide examples for those who prefer different approaches to doing things, such as using query builders, ORMs, frameworks, or testing assertion libraries, giving you the final say on where you want to put the fine-grain control, and where you want to delegate to libraries that make your life easier.