Chapter 6. Developing tasty views, forms, and layouts

 

In this chapter

  • How GSPs work
  • The common GSP tag libraries
  • Rendering and processing forms
  • Writing custom tag libraries
  • Creating stunning layouts
  • Adding visual effects and animation
  • Explore interactive Ajax tags and remoting

We’ve spent most of the book so far building the heart of Hubbub: processing incoming requests, interacting with the data model, calling business logic, and creating posts, users, and timelines. It’s been a lot of fun, but not visually satisfying. It’s time to leave the core functionality behind and do some work on the user interface (UI) of our web application.

A great-looking UI has all sorts of subtle impacts on the user. People think that a visually pleasing application is more robust, more performant, and more productive than a bare-bones application, even though none of that may be true.

In this chapter, we’ll focus on the frontend. We’ll cover the basics of putting forms together, and we’ll investigate how to support multiple browsers by using reusable layouts. We’ll also turn our attention to visual effects and implement some slick animations and Ajax interactions. By the time we’re done, Hubbub will sparkle.

We first need to get a good grasp of Grails’ primary view technology: Groovy Server Pages (GSP), so our UI adventure will begin with a tour of the core GSP form tags.

6.1. Understanding the core form tags

6.2. Extending views with your own tags

6.3. Adding delicious layouts

6.4. Applying Ajax tags

6.5. Summary and best practices