JSR 371: MVC 1.0

Model-View-Controller or MVC is defined as “a software architectural pattern for implementing user interfaces. It divides a given software application into three interconnected parts, so as to separation internal representations of information from the ways that information is presented to or accepted from the user”. MVC is said to be the most commonly used pattern in Web framework particularly in HTML based applications, this became evident in the recent survey conducted by RebelLabs where Spring MVC topped the chart with 40% votes.

Due to MVC’s popularity and with the result of the latest Java EE survey, JSR 371 was born. JSR 371 aims to develop an MVC specification for Java EE, which is called MVC 1.0. Initially, MVC 1.0 is a part of JAX-RS, the proposal to create a separate JSR for MVC 1.0 was announced by Santiago Pericas-Geertsen last August 19. The leads for this JSR are Oracle’s Santiago Pericas-Geertsen, also a co-lead of JAX-RS Specification and Manfred Riem, also a JSF Specification’s co-lead.

According to the proposed specification, Web UI frameworks has two classifications: Action-based framework, where “HTTP requests are routed to controllers and turned into actions by application code” and Component-based framework, where “HTTP requests are grouped and typically handled by each component in an independent manner”. Rather than a replacement to component-based JSF, it is stated that JSR 371, an action-based framework, is a new method in building Web applications on Java SE 8 or higher platforms.

The following Java EE technologies were being considered as leverage in the development of MVC 1.0:

  • Model part – CDI and Bean Validation
  • View part – JSPs and Facelets
  • Controller part – JAX-RS

Final Release for this JSR is expected on the third quarter of 2016. For updates and other information on MVC 1.0, https://mvc-spec.java.net will be used as project site, though currently it is still empty. You can also get updates by following the two leads on Twitter, @spericas and @mnriem.

Spring Framework 4.1: General Availability Release

Spring was able to stay on schedule, seven months after they publicized their plan, Spring Framework 4.1 General Availability (GA) has been released and is now accessible. The GA announcement has been made by Juergen Hoeller, co-founder of Spring Framework, in Spring’s blog site last September 4.

Spring Framework 4.1, started its development in January 2014 and had its first release candidate in July followed up by a second release candidate last August 15 which includes fixes and improvements. According to Hoeller, the following are the new features being offered in 4.1:

He also mentioned a bunch of other improvements made for this release such as:

  • Direct field binding support with auto-growing for nested fields
  • Java 8’s Optional for injection points and MVC handler parameters
  • Support for the standard @Priority annotation for dependency ordering and selection
  • Annotated @Lookup methods with support for provided constructor arguments
  • Declarative SQL scripts and programmatic transactions in the TestContext framework
  • Enhanced Hibernate JPA setup: isolation levels, discovery of managed packages

Additional information on the new features and enhancements can be found here.

Other features that weren’t able to make on this GA release will be included in the 4.2 line which is scheduled on the second quarter of 2015.

Minimum requirements for 4.1 didn’t change, you still need JDK 6+, Servlet 2.5+ and JPA 2.0+ same with Spring Framework 4.0. The 4.1.x line is now the “primary maintenance branch”, therefore, early upgrade to 4.1 is recommended. Since 4.1 line supersedes 4.0.x line, the 4.0.7 has been released together with 4.1’s GA to assist everyone in upgrading.

On the other hand, build snapshot for Spring Framework 4.1.1 is now available, you can start reviewing its API and Reference documentations.