Chapter 2. Using Controllers

In this chapter, we will cover:

  • URL routing using annotation-based configuration
  • Basics of caching
  • Using HTTP digest authentication
  • Generating PDFs in your controllers
  • Binding objects using custom binders
  • Validating objects using annotations
  • Adding annotation-based right checks to your controller
  • Rendering JSON output
  • Writing your own renderRSS method as controller output

Introduction

This chapter will help you to keep your controllers as clean as possible, with a well defined boundary to your model classes. Always remember that controllers are really only a thin layer to ensure that your data from the outside world is valid before handing it over to your models, or something needs to be specifically adapted to HTTP. The chapter will start with some basic recipes, but it will cover some more complex topics later on with quite a bit code, of course mostly explained with examples.

..................Content has been hidden....................

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