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 by taking discrete units of work that are useful to multiple handlers and putting that functionality into middleware that wrap 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 to perform the following skills within your web application:

  • Create middleware and effectively implement business logic within it
  • Understand Echo's middleware pipeline
  • Organize Echo middleware to simplify application handlers
  • Use contributed middleware from Echo
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.122.11