Chapter 5. Controlling application flow
This chapter covers
- How controllers, models, and views interact
- Implementing custom URLs and permalinks
- Writing filter code to reroute requests
- Using services for more maintainable architecture
- Data binding and error handling
- Using Command objects for tricky form validations
- Uploading and rendering images
In chapters 3 and 4, we spent plenty of time looking at how Grails handles domain objects. Along the way, we’ve used controllers and implemented a few GSP views to host our forms, but we’ve largely ignored how controllers work. It’s time to set that right.
In this chapter, we’ll focus on controllers. We’ll learn more advanced binding techniques for passing variables between forms and controllers, ...