Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Echo Quick Start Guide

You're reading from   Echo Quick Start Guide Build lightweight and high-performance web apps with Echo

Arrow left icon
Product type Paperback
Published in May 2018
Publisher Packt
ISBN-13 9781789139433
Length 136 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Ben Huson Ben Huson
Author Profile Icon Ben Huson
Ben Huson
Arrow right icon
View More author details
Toc

What this book covers

Chapter 1, Understanding HTTP, Go, and Echo, covers a high-level understanding of HTTP, Go, and the Echo framework. We explain how the Go HTTP standard library is structured and what useful primitives are included. By reviewing what features the standard library contains for HTTP requests, responses, and handling of requests, how using a web framework can improve the quality and robustness of your application will be evident. Also covered are some of the internals of the standard library web server and comparisons with Echo. Finally, we also cover initial environment setup in order for the reader to become immediately productive.

Chapter 2, Exploring Routing Capabilities, dives into a very fast and high-level tour of the major functionality of the Echo framework, and discusses around an optimal Echo project setup. Starting with the most basic Echo handler and working through an example application, we show the features and capabilities of Echo very briefly.

Chapter 3, Implementing Middleware, discusses one of the most common problems in web application development, which is how to appropriately map the resource described in the URL path to the actual code that represents the resource. Within this chapter, we will explain how Echo's routing engine works and provide real examples of how the routing capabilities within Echo perform better than other web frameworks in the space.

Chapter 4, Developing Echo Projects, covers request and response processing pipelines within Echo. By using middleware, we show how you can simplify your handler code by breaking handler units of work into middleware functions. We also explain how middleware chaining works and what to expect when you use middleware in Echo.

Chapter 5, Utilizing the Request Context and Data Bindings, explains how context is used within the Echo framework. Context within the Echo framework allows for simplification of otherwise difficult information passing. Since context is built into the handler function signature, your code will always have access to this construct. This chapter also investigates a few mechanisms related to the context, which are request binding and response rendering. The chapter shows examples of how to accomplish as well as some related best practices.

Chapter 6, Performing Logging and Error Handling, exposes to the reader an often-overlooked but critically important aspect of application design: logging and error handling. This chapter provides real examples of how logging and error handling can work within your Echo-based web applications.

Chapter 7, Testing Applications, marches into effective testing techniques for testing a web application API. We will start with some definitions of various forms of testing and then progress into test implementations. There are also neat tricks shown within the chapter to provide you with more information about coverage numbers from external testing.

Chapter 8, Providing Templates and Static Content, goes over how to interact with Echo's file serving capabilities in order to provide static content to your callers. By building on Go's html/template package, we also go into depth on how to make the most of dynamic template rendering.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image