Chapter 4. Implementing Middleware
Middleware is an important concept in web application development, and when implemented properly, this can result in efficient code reuse. By implementing and employing middleware within your application, you will benefit from an overall reduction in the complexity of your handler code,as well as duplication.This is achieved bytakingdiscreteunits of workthat are useful to multiple handlers and putting that functionalityintomiddlewarethatwrap your handlers.
Within this chapter, we will explore common request and response processing pipelines within web applications utilizing Echo's middleware framework. You will be given examples of how Echo middleware chaining works, as well as how implementing middleware will make your application simpler and more maintainable. You will also learn more about available middleware implementations that come with Echo that are immediately useful within your application.
After reading this chapter, you will have the confidence...