CHAPTER 11The Web Layer

Grails implements the MVC pattern, in which your business logic is separated from the application's presentation. This enables you to easily change the look of your application without accidently modifying its behavior. The web layer consists of two major parts: views and controllers. Views are responsible for rendering the user interface and are implemented by using GSPs, which are an extension of JSPs and can include Groovy code. Controllers manage and coordinate your application by receiving user actions from the view and acting on them—for example, by interacting directly with the domain model, delegating actions to a different controller or a different layer, or redirecting to a different view.

Figure 11-1 shows ...

Get Groovy and Grails Recipes now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.