Spring Roo 2.0.x | |
Developer(s) | DISID, Pivotal Software |
---|---|
Stable release | 1.3.2 / September 1, 2015 |
Preview release | 2.0.0 RC2 / August 30, 2017 |
Written in | Java |
Platform | Java SE |
Type | Rapid application development |
License | Apache License 2.0 |
Website | projects |
Spring Roo is an open-source software tool that uses convention-over-configuration principles to provide rapid application development of Java-based enterprise software. [1] The resulting applications use common Java technologies such as Spring Framework, Java Persistence API, Thymeleaf, Apache Maven and AspectJ. [2] Spring Roo is a member of the Spring portfolio of projects.
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] The current Roo project engineers are employed by SpringSource and as such Roo releases typically support the latest available releases of other Spring portfolio projects.
In 2014 DISID takes over the leadership of the open source framework Spring Roo after the partnership agreement with Pivotal. They collaborate on further development of the Spring Roo project. Roo will continue in its goal of providing a code-gen style of RAD framework.
The Spring Roo project will remain as an open source project under Spring, maintaining the same current licensing policy. Both Pivotal and DISID are calling on the Spring and Java communities for anyone who would like to collaborate in the project.
Roo's default installation facilitates the creation of applications that comply with the following standards and major technologies: [9]
The above list can be augmented through additional Roo add-ons, which provide Roo's method of extensibility.
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.
While there are many ways that software can automatically generate code, [11] 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. [12] [13] [14]
Spring Roo uses add-ons to provide all the functionality within and on top of an OSGi runtime system based on Apache Felix.
There are numerous commands available in Roo, depending on which "base add-ons" (those which ship with Roo) and "third-party add-ons" (those that do not ship with Roo) have been installed. The base add-ons shipping with Roo 2.0.x include:
backup
Roo also includes a core set of modules that provide a hosted execution environment for different add-ons. These major modules include:
Spring Roo differentiates from other convention-over-configuration rapid application development tools in the following major ways: [15]
The OSGi Alliance, formerly known as the Open Services Gateway initiative, is an open standards organization founded in March 1999 that originally specified and continues to maintain the OSGi standard.
Java Enterprise Edition, formerly Java 2 Platform, Enterprise Edition (J2EE) is a set of specifications, extending Java SE 8 with specifications for enterprise features such as distributed computing and web services. Java EE applications are run on reference runtimes, that can be microservices or application servers, which handle transactions, security, scalability, concurrency and management of the components it is deploying.
NetBeans is an integrated development environment (IDE) for Java. NetBeans allows applications to be developed from a set of modular software components called modules. NetBeans runs on Windows, macOS, Linux and Solaris. In addition to Java development, it has extensions for other languages like PHP, C, C++, HTML5, and JavaScript. Applications based on NetBeans, including the NetBeans IDE, can be extended by third party developers.
Eclipse is an integrated development environment (IDE) used in computer programming. It contains a base workspace and an extensible plug-in system for customizing the environment. Eclipse is written mostly in Java and its primary use is for developing Java applications, but it may also be used to develop applications in other programming languages via plug-ins, including Ada, ABAP, C, C++, C#, Clojure, COBOL, D, Erlang, Fortran, Groovy, Haskell, JavaScript, Julia, Lasso, Lua, NATURAL, Perl, PHP, Prolog, Python, R, Ruby, Rust, Scala, and Scheme. It can also be used to develop documents with LaTeX and packages for the software Mathematica. Development environments include the Eclipse Java development tools (JDT) for Java and Scala, Eclipse CDT for C/C++, and Eclipse PDT for PHP, among others.
AspectJ is an aspect-oriented programming (AOP) extension created at PARC for the Java programming language. It is available in Eclipse Foundation open-source projects, both stand-alone and integrated into Eclipse. AspectJ has become a widely used de facto standard for AOP by emphasizing simplicity and usability for end users. It uses Java-like syntax, and included IDE integrations for displaying crosscutting structure since its initial public release in 2001.
JavaServer Faces (JSF) is a Java specification for building component-based user interfaces for web applications and was formalized as a standard through the Java Community Process being part of the Java Platform, Enterprise Edition. It is also a MVC web framework that simplifies construction of user interfaces (UI) for server-based applications by using reusable UI components in a page.
Maven is a build automation tool used primarily for Java projects. Maven can also be used to build and manage projects written in C#, Ruby, Scala, and other languages. The Maven project is hosted by the Apache Software Foundation, where it was formerly part of the Jakarta Project.
Apache Beehive is a discontinued Java Application Framework that was designed to simplify the development of Java EE-based applications. It makes use of various open-source projects at Apache such as XMLBeans. It leverages innovations in Java 5 which include JSR-175, which is a facility for annotating fields, methods and classes so that they can be treated in special ways by runtime tools. It builds on the framework developed for BEA Systems Weblogic Workshop for its 8.1 series. BEA later decided to donate the code to Apache.
AppFuse is an open-source Java EE web application framework. It is designed for quick and easy start up of development, while also using open-source Java technologies such as Spring Framework, Hibernate and Struts. AppFuse was originally created by Matt Raible, who wanted to eliminate the "ramp up" time in building new web applications.
The Spring Framework is an application framework and inversion of control container for the Java platform. The framework's core features can be used by any Java application, but there are extensions for building web applications on top of the Java EE platform. Although the framework does not impose any specific programming model, it has become popular in the Java community as an addition to, or even replacement for the Enterprise JavaBeans (EJB) model. The Spring Framework is open source.
The Java Persistence API (JPA) is a Java application programming interface specification that describes the management of relational data in applications using Java Platform, Standard Edition and Java Platform, Enterprise Edition/Jakarta EE.
Apache Felix is an open source implementation of the OSGi Core Release 6 framework specification. The initial codebase was donated from the Oscar project at ObjectWeb. The developers worked on Felix for a full year and have made various improvements while retaining the original footprint and performance. On June 21, 2007, the project graduated from incubation as a top level project and is considered the smallest size software at Apache Software Foundation.
Convention over configuration is a software design paradigm used by software frameworks that attempts to decrease the number of decisions that a developer using the framework is required to make without necessarily losing flexibility. The concept was introduced by David Heinemeier Hansson to describe the philosophy of the Ruby on Rails web framework, but is related to earlier ideas like the concept of "sensible defaults" and the principle of least astonishment in user interface design.
Java view technologies and frameworks are web-based software libraries that provide the user interface, or "view-layer", of Java web applications. Such application frameworks are used for defining web pages and handling the HTTP requests (clicks) generated by those web pages. As a sub-category of web frameworks, view-layer frameworks often overlap to varying degrees with web frameworks that provide other functionality for Java web applications.
Apache Empire-db is a Java library that provides a high level object-oriented API for accessing relational database management systems (RDBMS) through JDBC. Apache Empire-db is open source and provided under the Apache License 2.0 from the Apache Software Foundation.
Virgo is an open source, OSGi-based, Java application server. Virgo supports the deployment of OSGi bundles and unmodified Java web applications as well as OSGi-influenced Shared Libraries WARs and Shared Services WARs.
MyBatis is a Java persistence framework that couples objects with stored procedures or SQL statements using an XML descriptor or annotations.
Thymeleaf is a Java XML/XHTML/HTML5 template engine that can work both in web (servlet-based) and non-web environments. It is better suited for serving XHTML/HTML5 at the view layer of MVC-based web applications, but it can process any XML file even in offline environments. It provides full Spring Framework integration.
Oracle TopLink is mapping and persistence framework for Java developers. TopLink is produced by Oracle and is a part of Oracle's OracleAS, WebLogic, and OC4J servers. It is an object-persistence and object-transformation framework. TopLink provides development tools and run-time functionalities that ease the development process and help increase functionality. Persistent object-oriented data is stored in relational databases which helps build high-performance applications. Storing data in either XML or relational databases is made possible by transforming it from object-oriented data.