Thursday, April 21, 2011

Things that I like about Spring roo

Its been a while since I started working on Spring Roo and in this post I'll summarize my experience working with Spring roo and why I always recommend it to everyone developing Spring-based applications.

1- Tab-completion feature of roo shell while entering commands. If you use tab completion feature while entering roo commands, you'll find that it brings down the learning curve for the tool. You don't need to remember commands word-by-word and let roo help you with find your command. 
2 - Roo's help command gives you enough information about the command. So, if you don't know what optional or mandatory arguments you have to enter for a command, either use tab or simply execute the help command.
3 - Maven-ized project is created with the project command. You have your compiler plugins, eclipse and IntelliJ IDEA IDE plugins pre-configured in your pom.xml file.
4 - Sophisticated support for creating JPA entities. You can specify relationships via roo commands and let roo handle the code generation.
5 - Scaffolding  of GWT, Spring Web MVC, Flex, and so on applications from JPA entities.
6 - Best practices followed in code generation. You can be sure that the code follows the best practices in Spring application development.
7 - Spring roo is for developers who understand Spring, JPA and other technologies used in the application. You can create a simple CRUD application from roo within minutes but if you need to modify the code, then you need to understand the code thoroughly. This is where Spring Roo Cookbook comes into picture :)
8 - One of the most important feature of Spring roo is round-tripping support. If you change a JPA entity, the changes are reflected in the scaffolded GWT and Spring Web MVC applications. This makes it possible to use Spring roo throughout the development of your project.
9. Spring roo will never overwrite the methods that you write. Roo-managed code resides in AspectJ ITDs, and if you never modify the ITDs you can be sure that your code in Java source files will remain intact.
10. You can provide a custom implementation for a roo-generated method in AspectJ ITD by re-defining the method in the corresponding Java file.  So, if roo-generated method in AspectJ ITD doesn't meet your requirement, you have a way to customize it.
11. You can extend roo by writing your own add-ons and deploying it. It may be a bit tricky in the beginning to write an add-on but a quick look at existing add-ons can give you fair amount of idea of how roo generates code. Roo provides commands to create a simple or an advanced add-on to give you a kick-start at writing add-ons.
12. Configuring a maven plugin can be a pain sometimes. Roo-generated applications contain the plugin configuration which simplifies development. For instance, GWT plugin is configured by roo in pom.xml when you scaffold a GWT application from JPA entities, and GAE plugin is configured when you create an application for GAE.
13. Roo supports creation of integration tests for JPA entities
14. Roo supports creation of Selenium tests for Controllers.

No comments:

Post a Comment