Real-world Spring Roo. Part 1 – Introduction

Recently I’ve got a good chance to work with Spring Roo. Specifically we use version 1.2.3. It is a Java-based framework which glues a bunch of technologies underneath:

  1. Dojo/JSP for the presentation layer
  2. Apache Tiles
  3. Spring Framework including Spring MVC
  4. JPA
  5. Hibernate

You would probably like to use something else instead of the choices made by Spring Roo developers. For example you would like to go with jQuery instead of Dojo, or use GWT for your presentation layer. It’s quite possible so we decided to go with the default choices.

If you ever tried something like Grails – you’ll be pretty familiar:

  1. You have the full stack of technologies integrated for you already
  2. MVC concepts are the same
  3. Split across layers is pretty much the same: presentation(GSP vs JSPX), controllers, dao, services
  4. Scaffolding
  5. Dynamic queries in Grails vs Finders in Roo

Hopefully the following set of articles which will appear in this series will help you to get beyond the beautiful demos that promise you an easy life. In the reality you need to spend some efforts on the default UI to make it usable to some extent.

Just several notes before we start getting into details of the framework problems. Please note that the version of Dojo used is 1.6, not the latest 1.9. You should definitely take this into account when doing a bunch of JS development in your Roo project.

Also you should be pretty careful with your development environments. Since Spring Roo hardly uses auto-generated code – all of the developers should be really using the same version. In Grails you won’t have much difference between 1.3.5 and 1.3.6 in terms of code you need to commit. However the resulting generated code is pretty different in Roo between 1.2.3 and 1.2.4

All of the code is available on GitHub: https://github.com/defascat/real-world-spring-roo.git

So lets dive deeper and see what can be done to the default application to make it usable:

  1. Aspects and what they mean to us?
  2. Adding grid filtering
  3. Adding advanced grid filtering
  4. Adding grid column sorting
  5. CRUD operations or the complex objects.
  6. Tests. What can be done to the default project tests?
  7. … to be continued