Advantage of using Spring roo over play framework (if we use Spring framework)?

18bytes picture 18bytes · Jun 27, 2012 · Viewed 7.4k times · Source

I recently stumbled upon Play framework while evaluating frameworks to use in a project. I need to use Java language and JVM (so grails is not an option).

From initial impression Play framework looks very similar to Django (or Rails), but Spring Roo looks interesting because I use Spring framework for core components.

Is there any advantage of using Spring Roo if i already use core Spring framework (say for e.g. integration)?

Is there any known major issues with Spring Roo? (e.g. like losing control over code as it generates for us)

Answer

SergeyB picture SergeyB · Oct 7, 2012

It all depends on what kind of application you are developing. If you want to have a simple application with a few controllers, I am sure Play is a good candidate. However if you are writing a large scale enterprise application and want to take advantage of all that Spring has to offer, Roo is the way to go. Spring is the de facto enterprise Java framework, every software vendor makes sure to provide Spring integration, for example it takes one line of XML to launch a SOAP web service:

<jaxws:endpoint implementor="org.apache.cxf.jaxws.service.Hello" address="http://localhost:8080/test" />

Want to connect to a RabbitMQ

<rabbit:connection-factory id="connectionFactory"/>
<rabbit:template id="amqpTemplate" connection-factory="connectionFactory"/>

But that is just core Spring, Roo makes things even simpler, want to add a database? Type one line in Roo's command shell. Security? One more line. Launch to Cloud Foundry? One more line. The auto-suggest features will tell you all the command available and parameters required for each one. The BIGGEST advantage of Roo (for a seasoned Spring developer) is not having to learn any new frameworks, you just type Roo commands and get standard Spring code that you can then do whatever you want with. If you feel more comfortable with plain Spring, you can use Roo to jump start your project and then remove it. I am not one to jump on latest technology bandwagons, pretty skeptical when it comes to "this will improve your life!" promises, but Roo really does make development simpler and quicker.