Book Image

Spring Roo 1.1 Cookbook

By : Ashish Sarin, Ashish Kumar Sarin, Brian Fitzpatrick
Book Image

Spring Roo 1.1 Cookbook

By: Ashish Sarin, Ashish Kumar Sarin, Brian Fitzpatrick

Overview of this book

Spring Roo is an easy-to-use productivity tool for rapidly developing Java enterprise applications using well-recognized frameworks such as Spring, Hibernate, AspectJ, Spring Web Flow, Spring Security, GWT, and so on. Spring Roo takes care of creating maven-enabled projects, enterprise application architecture based on your choice of technologies, unit/integration tests based on your choice of testing framework, and so on. The bottom line is that if you're using Spring, then you must consider using Spring Roo for increased productivity. Spring Roo 1.1 Cookbook brings together a collection of recipes that demonstrate how the Spring Roo developer tool simplifies rapidly developing enterprise applications using standard technologies/frameworks such as JPA, GWT, Spring, Flex, Spring Web Flow, Spring Security, and so on. It introduces readers to developing enterprise applications for the real world using Spring Roo tool. The book starts off with basic recipes to make readers comfortable with using Spring Roo tool. As the book progresses, readers are introduced to more sophisticated features supported by Spring Roo in the context of a Flight Booking application. In a step-by-step by fashion, each recipe shows how a particular activity is performed, what Spring Roo does when a command is executed, and why it is important in the context of the application being developed. Initially, you make a quick start with using Spring Roo through some simple recipes. Then you learn how Spring Roo simplifies creating the persistence layer of an enterprise application using JPA. You are introduced to the various roo commands to create JPA entities, create relationships between JPA entities, create integration tests using Spring TestContext framework, and so on. Following this, the book shows you how Spring Roo simplifies creating the web layer of an enterprise application using Spring Web MVC, Spring Web Flow, and how to create selenium tests for controller objects. Subsequently, we focus on using Spring-BlazeDS, GWT, JSON, and so on. Spring Roo commands that are used to incorporate e-mail/messaging features into an enterprise application are demonstrated next. Finally, we wrap it up with some miscellaneous recipes that show how to extend Spring Roo via add-ons, incorporate security, create cloud-ready applications, remove Spring Roo from your enterprise application, and so on.
Table of Contents (14 chapters)
Spring Roo 1.1 Cookbook
About the Author
About the Reviewers

Using Spring Roo with Eclipse/STS

As Roo is a command-line driven tool, you may want to integrate it with a feature rich IDE like Eclipse or STS to simplify application development. If you are using STS, you don't need to worry about integrating Roo with it because support for Roo is built into STS. If you want to integrate Roo with Eclipse, you can install STS components in Eclipse, in the same way as you install any other Eclipse plugin.

If you are using any other IDE or you don't want to integrate your Eclipse IDE with Spring Roo, you can run Spring Roo in the background and use your favorite IDE to develop your enterprise application. As you make modifications to your enterprise application using your IDE, Spring Roo will work in the background to manage the enterprise application.

The following screenshot shows Spring Roo was started from inside Eclipse IDE. It shows that the roo> prompt is now displayed adjacent to a text box where you can enter your Roo commands:

If you compare the output shown in the given screenshot with the output that you saw earlier when you started the Roo shell from command prompt, you will notice that they are not the same. Really? Yes, in the case of Eclipse or STS, to use auto-completion (as suggested in the welcome text) feature of Roo commands, you need to use CTRL + SPACE instead of TAB.

See also

  • The next recipe, titled Getting help and hints from Roo, shows how Spring Roo provides context-sensitive hints on using the Roo shell and how to access help at any given time.