Spring Roo
| Company type | Open-source software |
|---|---|
| Industry | Software development |
| Founded | April 2009 |
| Defunct | 2019 |
Area served | Java enterprise systems development |
| Products | Rapid application development tool for Java |
| Owner | DISID, VMware (final maintainers) |
Spring Roo is an open-source software solution created to speed up rapid application development for Java-based enterprise systems by leveraging convention-over-configuration methodologies.
The initiative has been discontinued, with active maintenance ceasing in 2019.
Background and purpose
The goal behind Spring Roo was to "significantly enhance Java developer efficiency while preserving engineering quality and adaptability."
Its debut occurred at the SpringOne Europe conference for developers in April 2009, where the first alpha version was showcased through a live coding session that involved the audience in selecting the project’s name. Ultimately, "Spring Roo" was chosen over contenders like Spring Boost and Spring Spark.
After multiple iterations, the 1.0.0.RELEASE version of Spring Roo became generally available in December 2009. The subsequent 1.1.0.RELEASE, launched in October 2010, incorporated an OSGi base with an add-on discovery mechanism, incremental database reverse engineering capabilities, simplification of Spring MVC page complexity, and support for additional technologies such as Google Web Toolkit, Google App Engine, Apache Solr, and JSON.
In 2014, leadership of Spring Roo transitioned to DISID through a collaboration with Pivotal.
By 2019, DISID alongside VMware officially deprecated Spring Roo, and its repository was archived in 2022.
Supported standards and technologies
Spring Roo’s standard setup facilitates building applications compatible with a variety of essential standards and frameworks:
- Apache ActiveMQ (embedded JMS)
- Apache Maven (version 3.2 or higher)
- Apache Tomcat (embedded integration)
- AspectJ (for AOP and mixin capabilities)
- AspectJ Development Tools (Eclipse plugin)
- Bootstrap (version 3.3.6+)
- Cloud computing platforms such as SpringSource Cloud Foundry, Google App Engine, VMforce
- Eclipse IDE (supporting concurrent execution and project metadata management)
- EclipseLink and Hibernate as implementations of JPA
- Java Bean Validation (JSR 303), including Hibernate Validator
- Java API for XML Web Services
- Java Message Service
- Multiple implementations of Java Persistence API
- Java Transaction API via Spring’s transaction abstraction layer
- Support for Java versions 5, 6, and 7 (starting from Roo 1.2.4)
- JQuery (version 1.11+)
- JSON support for RESTful services
- JUnit
- Log4J
- Built on an OSGi framework
- Representational State Transfer (REST)
- Spring Boot (version 1.4+)
- Spring Data JPA (version 1.10+)
- Spring Framework (version 4+)
- Spring Security (version 4+)
- Spring Web Flow
- SpringSource Tool Suite with embedded Roo shell and commands
- Thymeleaf (version 3+)
This array can be expanded through Roo add-ons to extend platform functionality.
Interface
The main user interface of Spring Roo is a command-line shell that supports both CLI operations and hosting plug-ins ("add-ons"). Engineered for seamless workflows, Roo operates alongside users’ preferred IDEs or editors by monitoring file system changes and scanning projects at startup to detect any alterations made while inactive.
The shell offers features enhancing usability such as command-line completion via TAB key, built-in online help, contextual hints, and intelligent recognition of user intent. It enables developers to initiate new projects or efficiently maintain existing ones.
An example sequence to generate a new application and execute it using the Spring Boot Maven plugin:
<syntaxhighlight lang="bash"> $ 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 </syntaxhighlight>
These commands benefit from TAB completion alongside a "hint" feature providing instant assistance on demand.
Architecture
Roo functions by creating AspectJ inter-type declarations, also known as mixins or introductions, which facilitate separation of concerns by isolating Roo-managed code from user-authored code. This approach enables Roo to selectively update only the required AspectJ declarations without altering other files.
The delivery of features in Spring Roo is managed through add-ons operating within an OSGi runtime environment built on Apache Felix.
Differentiation
Spring Roo distinguishes itself among rapid application development tools that emphasize convention over configuration by concentrating on:
- Java platform efficiency: Specifically designed for Java developers, Roo does not require any language besides Java. It capitalizes on widely adopted Java enterprise standards and technologies to ensure extensive reuse of existing expertise.
- User experience: The Roo shell provides an intuitive, discoverable interface that reduces the learning curve. Commands begin with @Roo to support IDE command-line auto-completion. Developers can perform all tasks within their IDE without needing awareness of Roo’s presence and can modify files offline.
- Absence of runtime dependencies: Roo does not introduce any runtime APIs or components, thereby avoiding additional CPU, memory, or storage consumption related to Roo. Its generated code is tailored for lightweight cloud environments and supports high scalability.
- Prevention of vendor lock-in: Projects can remove Roo swiftly to avoid vendor lock-in. Since there are no runtime elements, @Roo annotations exist solely in source code, and AspectJ mixins can be converted into conventional *.java files, Roo leaves no permanent dependencies.
- Extensibility: By separating the core framework from base add-ons, third-party developers can effortlessly enhance Roo’s functionality.
See also
- Grails (framework)
- Griffon (framework) – A desktop framework inspired by Grails
- Play Framework