Chapter 5. Rapid web applications with Roo
This chapter covers
Converting your application into a web application
Developing controllers and views
The web scaffolding engine
Customizing your application
If you’re like us and have written a lot of web application code, you probably expect to spend a significant amount of time to configure a web application. Because you want to get started, you may just want to dive right in, install Spring MVC by hand, and write some code against these entities.
Stop! Don’t touch that keyboard yet! We’ll show you how to save even more time by letting Roo configure and generate your web application for you.
In this chapter we use a simple Roo shell command, web mvc controller, to install Spring’s MVC web framework, and generate a sample controller and view. Then we use web mvc scaffold to generate full web pages complete with create, read, update, delete, and searching capability. We review the scaffolding in depth so that you understand how it functions, and to prepare you for customizing the user interface in chapter 6.
You’ll see that Roo provides a comprehensive Spring MVC solution at a fraction of the time it would take you to configure your own, and that it installs and configures key usability features, such as layout management and internationalization.
Let’s get started by reviewing Spring’s MVC framework.
5.1. The Spring MVC web framework
5.2. Roo Spring MVC quick-start
5.3. Web scaffolding for entities
5.4. Accessing other Spring beans
5.5. Summary
5.6. Resources