Spring Roo

Open-source software tool

Spring Roo

Spring Roo 2.0.x

Developer(s)| DISID, Pivotal Software
Final release|

1.3.2 / September 1, 2015 (2015-09-01)

Preview release|

2.0.0.RELEASE / September 30, 2019 (2019-09-30)

Written in| Java
Platform| Java SE
Type| Rapid application development
License| Apache License 2.0
Website| github.com/spring-attic/spring-roo

Spring Roo is a open-source software tool that uses convention-over-configuration principles to provide rapid application development of Java-based enterprise software.[1]

The project has been deprecated and active development has ended.[2]

## Motivation and history

[edit]

Spring Roo's mission statement is to "fundamentally improve Java developer productivity without compromising engineering integrity or flexibility".[3]

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" within SpringSource).[4] Ultimately the name "Spring Roo" was preferred over alternatives including Spring Boost, Spring Spark, Spring HyperDrive and Spring Dart.[5]

Several releases followed,[6][7] with the Roo 1.0.0.RELEASE (general availability) released in December 2009. In October 2010, Spring Roo 1.1.0.RELEASE was released. The 1.1.0 release moved to an OSGi foundation with associated add-on discovery model, plus added support for incremental database reverse engineering, Spring MVC page complexity reduction, Google Web Toolkit, Google App Engine, Apache Solr, JSON and smaller features like serializable automation.[8]

In 2014 DISID took over the leadership of the open source framework Spring Roo after a partnership agreement with Pivotal.

DSID and VMware deprecated Spring Roo and announced the end of active development in 2019 and the repository was archived in 2022.[2]

## Standards and technology compatibility

[edit]

Roo's default installation facilitates the creation of applications that comply with the following standards and major technologies:[9]

* Apache ActiveMQ (as an embedded JMS implementation)
* Apache Maven (version 3.2 or above)
* Apache Tomcat (embedded execution support)
* AspectJ (used for AOP plus mixins to achieve separation of concerns)
* AspectJ Development Tools (Eclipse plugin)
* Bootstrap (version 3.3.6 or above)
* Cloud computing (via SpringSource Cloud Foundry, Google App Engine and VMforce)
* Eclipse IDE (concurrent execution and project metadata creation)
* EclipseLink (as a JPA implementation)
* Hibernate (as a JPA implementation)
* Java Bean Validation (JSR 303) (including Hibernate Validator)
* Java API for XML Web Services (both services and clients)
* Java Message Service (both message producers and consumers)
* Java Persistence API (multiple implementations)
* Java Transaction API (via Spring transaction abstraction)
* Java (version 5, 6 or 7). Java 7 is supported since Roo 1.2.4.[10]
* JQuery (version 1.11 or above)
* JSON (REST support)
* JUnit (automated tests for user projects)
* Log4J (installation and configuration)
* OSGi (the Roo tool is built on OSGi)
* Representational State Transfer (REST)
* Spring Boot (version 1.4 or above)
* Spring Data JPA (version 1.10 or above)
* Spring Framework (version 4 or above)
* Spring Security (version 4 or above)
* Spring Web Flow (installation and flow definition)
* SpringSource Tool Suite (STS has an embedded Roo shell and Roo command helpers)
* Thymeleaf (version 3 or above)

The above list can be augmented through additional Roo add-ons, which provide Roo's method of extensibility.

## User interface

[edit]

Spring Roo's main user interface is a command-line shell. The shell provides both a command-line interface and also a mechanism to host plug-ins (which are called "add-ons" in Roo). One key design goal of Roo is to ensure a user can continue to work in a "natural way", which typically means using their preferred integrated development environment (IDE) or text editor for most tasks. As such Roo is often loaded in a separate window to the IDE or text editor, and will monitor the file system for changes made by the user outside of Roo. A startup-time scan of a user's project is also performed to determine any changes that may have been made while Roo was not running.

The user interface shell supports extensive usability features including command-line completion (i.e. press TAB), online help, hinting (a form of context-sensitive help) and contextual awareness (which provides automatic inference of likely intentions based on recent activity). This allows a user to create a new software project via the Roo shell, or use Roo on an existing project. The following is an example of the commands used by Roo to create a new application plus the Spring Boot Maven plugin run goal to compile and run the application using an embedded HTTP server:

$ mkdir hello
$ cd hello
$ roo.sh
roo> project setup --topLevelPackage com.foo
roo> jpa setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY
roo> entity jpa --class ~.domain.Timer
roo> field string --fieldName message --notNull
roo> repository jpa --all
roo> service --all
roo> web mvc setup
roo> web mvc view setup --type THYMELEAF
roo> web mvc controller --all --responseType THYMELEAF
roo> web mvc controller --all --pathPrefix /api
roo> quit
$ mvn spring-boot:run

The above commands did not need to be typed in full, but rather were completed using TAB. Additionally, the "hint" command could have been used to acquire help at any time.

## Architecture

[edit]

Roo operates by generating AspectJ inter-type declarations (otherwise known as mixins or introductions). This achieves separation of concerns, as the code maintained by Roo is in a different compilation unit from the code a user writes. This means Roo can incrementally modify the AspectJ inter-type declarations that it needs to and leave all other files intact.[11][12][13]

Spring Roo uses add-ons to provide all the functionality within and on top of an OSGi runtime system based on Apache Felix.

## Differentiation

[edit]

Spring Roo differs from other convention-over-configuration rapid application development tools like so:[14]

1. Java platform productivity: Roo provides a productivity solution for Java developers. It does not require the user to program in any language other than Java. It also uses mainstream Java enterprise application standards and technologies (as listed above) to maximize reuse of existing developer knowledge, skills and experience.
2. Usability: Roo's shell is designed to provide a discoverable, easy-to-use environment that minimizes training requirements. Roo annotations all start with @Roo to facilitate code assist (command line completion in IDEs). Users can use their IDE for all operations and do not need to be aware of Roo running. Roo also supports users editing their files when Roo is not running.
3. No runtime: Roo does not provide a runtime API or require specific runtime components. This ensures there is no Roo-related CPU, memory and disk storage resource consumption at runtime. Roo code is optimized for small-footprint cloud deployment and high scalability use cases.
4. Avoids lock-in: Roo can be rapidly removed from a user project, which is useful to protect against vendor lock-in. This is possible because there is no runtime component to remove, @Roo annotations are "source retention" only (ensuring they are not preserved in compiled *.class files)[15] and Roo's AspectJ inter-type declarations can be "pushed in" to standard *.java compilation units.[16][17]
5. Extensibility: Roo's separation of core infrastructure and base add-ons intends to allow third parties to easily extend Roo.[18][19]

## See also

[edit]

* Free and open-source software portal
* Computer programming portal

* Grails (framework)
* Griffon (framework) – A Desktop framework inspired by Grails
* Play Framework

## References

[edit]

1. ^ "InfoWorld: SpringSource CEO to tout Roo, a new Java enhancement" by Paul Krill; Dated 2009-06-01.
2. ^ a b "Spring Roo code repository README". spring-attic / spring-roo. Retrieved 2025-04-08.
3. ^ "Spring Roo reference documentation", Mission Statement section; Retrieved 2010-2-21.
4. ^ "Tech Videos: The Future of Java Innovation" Archived 2009-10-09 at the Wayback Machine by Rod Johnson (CEO of SpringSource); Retrieved 2009-10-17.
5. ^ "Spring Roo reference documentation", History section; Retrieved 2010-2-21.
6. ^ "InfoQ: Spring Roo 1.0 M1 Released" by Srini Penchikala; Dated 2009-5-31.
7. ^ "Jira issue tracking for Spring Roo Project releases"; Retrieved 2010-2-21.
8. ^ "A Big Hop Forward: Spring Roo 1.1.0 Is Released!" Archived 2010-10-28 at the Wayback Machine, by Ben Alex (lead of Spring Roo at SpringSource); Retrieved 2010-10-27.
9. ^ "TechCast: Spring Roo podcast" Archived 2010-02-23 at the Wayback Machine by Ken Rimple; Retrieved 2010-2-21.
10. ^ "Spring Roo 1.2.4.RELEASE available now " Dated 2013-10-17.
11. ^ "InfoQ: Introduction to Spring Roo 1.0.0 Video Presentation", by Ben Alex (lead of Spring Roo at SpringSource); Retrieved 2010-2-21.
12. ^ "JAX Italia 2009 Conference: Spring Roo" by Massimiliano Dessì; Retrieved 2010-2-21.
13. ^ "Philadelphia Java User Group: Spring Roo" by Ken Rimple; Retrieved 2010-2-21.
14. ^ "Spring Roo Home Page"; Retrieved 2010-2-21.
15. ^ "Sun Java 5 JavaDocs for RetentionPolicy.SOURCE" by Sun Microsystems; Retrieved 2009-10-17.
16. ^ "Push-In Refactoring for AJDT" by Andrew Eisenberg (AJDT project lead at SpringSource); Retrieved 2009-10-17.
17. ^ "Eclipse AJDT intertypes and Push-In refactoring" Archived 2010-01-17 at the Wayback Machine by Dhruba Bandopadhyay; Dated 2009-12-31.
18. ^ "Italian Java User Group JavaDay IV Conference: Spring Roo Internals" by Massimiliano Dessì; Retrieved 2010-2-21.
19. ^ "Spring, Roo, and Alfresco Too: What Alfresco Gave to Spring and Why" by Jeff Potts; Dated 2009-12-16.

## External links

[edit]

* Official website

* v
* t
* e

Java (software platform)

Platforms|

* JVM
* Java ME (Micro)
* Java SE (Standard)
* Jakarta EE (Enterprise)
* Java Card
* Android SDK
* GraalVM

Oracle technologies|

* Squawk
* Java Development Kit
* OpenJDK
* Java virtual machine
* JavaFX
* Maxine VM

Platform technologies|

* Applets
* Servlets
* MIDlets
* JSP
* JSF
* Web Start (JNLP)
* Pack200
* Modules

Major third-party
technologies|

* Blackdown
* Eclipse
* GNU Classpath
* GWT
* Harmony
* Hibernate
* IcedTea
* Jazelle
* Spring
* Struts
* TopLink
* WildFly

History|

* Java version history
* Java Community Process
* Sun Microsystems
* Free Java implementations

JVM languages|

* Java
* BeanShell
* Clojure
* Groovy
* JRuby
* Jython
* Kotlin
* Processing
* Rhino
* Scala
* Oxygene

Community|

| Conferences|

* JavaOne
* Devoxx

|

Organizations|

* Apache Software Foundation
* Eclipse Foundation
* Java Community Process
* Oracle Corporation
* Sun Microsystems, Sun Microsystems Laboratories

People|

* James Gosling
* Arthur van Hoff
* Urs Hölzle
* Patrick Naughton

Category Computer programming portal
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template