O'Reilly logo

Groovy and Grails Recipes by Bashar Abdul-Jawad

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required