Kai Wähner (Twitter: @KaiWaehner, Blog: www.kai-waehner.de/blog) is an IT-Consultant in the Java EE, SOA, Cloud Computing and Big Data world. In his real life, he lives in Erlangen, Germany and works for TIBCO (www.tibco.com). Besides solving huge integration problems for large companies, Kai writes articles for magazines and speaks at international IT conferences such as JavaOne. Feel free to contact him via Twitter, LinkedIn or Email. Kai is a DZone MVB and is not an employee of DZone and has posted 54 posts at DZone. You can read more from them at their website. View Full User Profile

When to use Spring Roo?

  • submit to reddit

In this article, I will tell you about my experiences with Spring Roo. I will give recommendations when to use Spring Roo and when not to use it (yet).

What is Spring Roo?

“Spring Roo is a lightweight developer tool that makes it fast and easy to deliver instant results. Best of all, you code 100% in Java and get to reuse all your existing Java knowledge, skills and experience. You'll like it - and have plenty of fun too!” (http://www.springsource.org/roo)
Many introductory articles exist already, just use Google if you do not know Spring Roo yet. In a nutshell: Spring Roo is a Java-based tool (using the SpringSource Tool Suite which is based on Eclipse). It uses AspectJ to simulate many features of Grails and other frameworks with dynamic languages to improve the developer experience.

Spring Roo is awesome for CRUD-Clients!

You can create a CRUD application within minutes to create, read, update and delete data. I recommend Spring Roo for CRUD applications because of a good community and a powerful vendor (compared to other CRUD frameworks such as Roma Meta Framework or OpenXava).
Personally, I would prefer Grails, but if you want to create CRUD applications with Java, then Spring Roo is the best alternative.

Spring Roo is good for learning Technologies!

Spring Roo is also good for learning technologies because you get a working example in seconds, and you can create more complex stuff within minutes using the Roo Shell. Then you can learn and understand how Spring Roo uses these technologies.
Of course, Spring-based technologies such as Spring MVC or Spring Security are supported very well. Also JEE standards such as Bean Validation or JPA are supported. Besides, many further technologies are supported, e.g. GWT, JSF, Vaadin, Flex or Google App Engine. Actually, many of these addons are not production-ready yet - but Spring Roo is young and I am sure that many improvements will happen because of the large community.

Spring Roo is NOT good for complex Projects (yet)...

Please be aware, that this is my personal opinion due to my experience with Spring Roo: If you want to build something really complex, then you should use technologies such as JPA, GWT or Google App Engine without Spring Roo, because Spring Roo is not ready yet for this kind of project, and thus will probably create more questions than answers...
One exceptional case: If you want to realize an application which uses especially or better just Spring frameworks, then you might start your project with Spring Roo. It can be a huge help in the beginning of a project.

Conclusion: Spring Roo is a nice Tool => Become a Part of the Community!

My final conclusion: You should know Spring Roo, because it is nice, but you should also know when to use it and when to use something else. Use it to create CRUD applications or to learn technologies. Do not use it (yet) for complex, large projects.
Spring Roo is young and has a large community plus a powerful vendor. You should participate and become a part of the Roo community to make it better and production-ready (this does not mean you have to commit code – I do not commit code as well – but even if you only read the JIRA issues and vote for your favorites helps the community).
So, if you never used Spring Roo yet, try it out now!

Best regards,

Kai Wähner (Twitter: @KaiWaehner)

[Content from my Blog: When to use Spring Roo - Kai Wähner's IT-Blog]

Published at DZone with permission of Kai Wähner, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)


Andrew Rubalcaba replied on Thu, 2011/04/07 - 9:40am

It also great to just bootstrap your project and get you up and going. When you are first setting up a project workspace. Its a hassle to do a lot of the initial setup by hand. I also like how it handles the Maven pieces for you, so you don't have to go off and figure out what jars are needed and what not. It handles all that for you. For a complex project you could use it up to a certain point and then the custom hard stuff can just be done by hand. If you work closely with your DBAs and lay a solid foundation on a the Data Model Layer, you can then use those as the basis for your Domain Objects.

Kai Wähner replied on Thu, 2011/04/07 - 11:37pm in response to: Andrew Rubalcaba

Hey Andrew,


I agree 100 percent, IF you want to create a Spring application. 

But if you want to create something else, you should not use Spring Roo in my opinion. It falls down when you have to realize more than just CRUD. Of course, you can customize everything by yourself. Actually, you even still have the possiblity to use e.g. the “finder”-feature of Roo to create finders.

Nevertheless, if you have to create a lot of stuff besides CRUD, you are mixed in between “what to do with Roo” and “what to do without Roo”. You can also get stuff out of AspectJ into your Java code. Thus, governance and maintainability is much more complex if you use Roo for some stuff and no Roo for other stuff.

Try out e.g. GWT with Roo. If you create a CRUD application with 5 entities and relationships, you get about 200 (or maybe only 50 classes, but toooo many!). That is fine if you just need CRUD, but if you want to customize some masks, it is no fun and time-consuming.


Best regards,

Kai Wähner (Twitter: @KaiWaehner)


Dean Schulze replied on Fri, 2011/04/08 - 9:50am

After reading this I still have no idea what Spring Roo is. Is it a client side framework like Grails or is it some kind of developer tool or development infrastructure? Their web page isn't any better.

Poor writing both in this article and on their web page.

Kai Wähner replied on Fri, 2011/04/08 - 11:06am in response to: Dean Schulze

Hey Dean,

 the intention of this article is not to explain what Spring Roo is! 

 In a nutshell: It is a development infrastructure, a collection of tools, frameworks and libraries to ease Java development (not just web development).

You might look at this very good article series to get a quick understanding of Spring Roo:



 Best regards, 

Kai Wähner (Twitter: @KaiWaehner)

Xu Yang replied on Mon, 2011/04/11 - 3:37am

if you want to build up your system with different modules and share the modules in the different project, it will be difficalt. what i am doing is, analysis my system's entity relationship, and setup roo project, create those CRUD code, and use refactor tool, push-in those code back, and remove roo script. base on that, i save lots of time to write those CRUD code time.

Rick Lawson replied on Thu, 2011/04/14 - 8:42pm

Nice short overview, having had some time to play with roo I agree. Great for quickstarting things, great to help you learn but I don't see using roo on a 500k loc project. The IBM article mentioned in the comments is a good read too.

Liezel Jane Jandayan replied on Thu, 2011/08/25 - 6:36am

The technology was first demonstrated during the opening keynote at the SpringOne Europe developer conference on 27 April 2009, with an initial alpha release concurrently being published. During the keynote an application was built live on-stage that would be used by conference attendees to vote on the preferred name for the project (which at that time was codenamed "Roo".-Jonathan Berkowitz

Shoaib Almas replied on Sat, 2012/08/25 - 5:57am

Thanks for the article! Would you be able to say a little about what would make a project sufficiently ‘complex’ such that you would not want to use Spring Roo? Where does it particularly fall down?

Java Forum

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.