Mitch Pronschinske is a Senior Content Analyst at DZone. That means he writes and searches for the finest developer content in the land so that you don't have to. He often eats peanut butter and bananas, likes to make his own ringtones, enjoys card and board games, and is married to an underwear model. Mitch is a DZone Zone Leader and has posted 2573 posts at DZone. You can read more from them at their website. View Full User Profile

Spring 3.0 Hits GA, but Don't Forget About Spring Roo RC4!

12.17.2009
| 6722 views |
  • submit to reddit
The big news from SpringSource is the general release of the Spring 3.0 framework.  While Spring 3.0 dominates the headlines, you may not have noticed that Spring Roo 1.0 RC4 was also just released.  The new release candidate includes over 90 bug fixes and enhancements since RC3 and has been updated with the Spring 3.0 GA release.  Both releases will benefit from the final approval of the Java EE 6 spec

Spring Roo 1.0 RC4
If you haven't heard about Roo, it's a customizable code generation tool for quickly building Spring applications in Java.  The tool was unveiled early this year and its framework uses a command line shell with context aware operations, tab completion, and coding hints.  Using a standard directory format, Roo builds Java applications, integrates with popular persistence choices, and automatically generates web tiers for REST-based web UIs.  Roo also auto-generates JUnit tests.  

RC4 now makes extensive use of Spring 3.0's conversion APIs and has upgraded to Spring Security 3.0 RC2.  Usability enhancements include TAB-base option help, filename completion, informative prompts, and more.  Roo can now automatically log all commands issued in a project and all the output from Roo in response to each command.  Spring Roo project lead Ben Alex gives an explanation of this feature in the Spring Roo project forums:

"File "log.roo" in the current working directory is always appended to (never overwritten). It contains all well-formed commands presented to the Roo shell and an indication of whether they worked (in which case they will not be commented out) or failed (in which case the will be prefixed by "// [failed]"). This makes the resulting logs useful for command playback."

// Spring Roo ENGINEERING BUILD [rev 452:459M] log opened at 2009-11-25 09:18:36
hint
help
// [failed] project --topLevelPackage com. --template ROO_ADDON_SIMPLE
project --topLevelPackage com.foo
persistence setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY
entity --name ~.Food --testAutomatically
// [failed] field boolean --fieldName from
field boolean --fieldName from --permitReservedWords
quit
// Spring Roo ENGINEERING BUILD [rev 452:459M] log closed at 2009-11-25 09:19:48

If you're using SpringSource Tool Suite, Roo RC4 requires that you upgrade to STS 2.3.

Spring 3.0
The new Spring framework requires Java 5 or later.  The updated Spring APIs bring Java 5 features, such as generics and annotations, to Spring 3.0.  The framework is compatible with the final Java EE 6 specification and runtime environment thanks to the release of GlassFish v3 last week.  Spring 3.0 can use JSF 2.0 and JPA 2.0 (using Eclipse 2.0) and run them outside of EE 6 in a container like Tomcat or Jetty.  The Spring 3.0 framework's native REST capabilities in Spring MVC are comprehensive, but some say they're not battle tested.  Spring's new expression language (SpEL) is introduced in 3.0 and it can be used to simplify the writing of rich expression.  SpEL has similar syntax to the Unified EL in JSF.  Spring 3.0 delivers specs like JSR-330 and JSR-303 along with new component model features into development environments with no server upgrade required.  Just upgrade your Spring application libraries to Spring 3.0.

Comments

Alexis MP replied on Thu, 2009/12/17 - 12:42pm

Sorry but saying that Spring 3.0 is "compatible with the final Java EE 6 specification" is very misleading. In fact it "supports" (read "can make us of") a small selected subset of the Java EE 6 APIs and even the REST implementation is not JAX-RS compliant. The only way to offer Java EE 6 compatibility is to pass the TCK by implementing either the web or the full profile. Note you're probably not the one to blame here since SpringSource has unfortunately been using similar phrasing for a while now.

Reza Rahman replied on Thu, 2009/12/17 - 10:00pm in response to: Alexis MP

Alexis,

Agreed. Personally, this is pretty diossapointing as I was really hoping SpringSource would choose to bury hatchet and implement the Java EE 6 Web Profile. Instead of embracing the clean-room CDI spec with strong type-safety, robust context management, powerful stereotypes, intuitive interceptors/decorators, producers/destructors, DI-based events and a comprehensive extensibility SPI, they've chosen to apply some minor patches in form of the JavaConfig enhancement to a DI system that increasingly looks cluttered with legacy functionality.

In fact, I'm puzzled as to why this is even a major release? Java SE 5? That's hardly a feature? JSF 2 and JPA 2? They probably did no work for that other than testing their runtime on GlassFish since the pluggability contract for neither API has changed. As you pointed out, the REST features are underwhelming compared to what's already theere is JAX-RS. The same is true of the EL that's not type-safe. At least they've implemented JSR 303 bean validation, that's a lot better than what the propgrammatic validation API that was there is Spring.

I do hope these guys change course some time soon or the community demand that they do and end the pointless fragmentation in enterprise Java...

Cheers,

Reza

Shaw Gar replied on Fri, 2009/12/18 - 12:09am

Spring was a definite improvement over J2EE and it's ugly cousin EJB 2.x. No one discredits Rod and team who helped realize Java EE 5 & 6. Everyone gladly accepted the criticisms, and that's how Java EE came into being. The time wheel has turned.. I think we are at a point to acknowledge progress by Java EE, just like we did by adopting Spring before. Maybe, it gives Spring another opportunity by inventing a disruptive new framework.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.