Interface21 is releasing new versions of its well-known Spring, and less well-known WebFlow frameworks. Among the highlights including adding support for Annotations Spring, and Java Server Faces (JSF) in WebFlow.
Spring, Interface21’s better known product, is adding enhancements to support more features of the future Java SE 6. Annotations emerged with Java EE 5 as part of a move to make the framework easier to use.
In the case of annotations, they are declarative, high-level statements that eliminate much of the need to write XML-based configuration files. The developer writes, essentially, this is what the program should do, and the tool generates the code to perform it. Philosophically, that is very consistent with the design of Spring, which was also intended to eliminate much of the need to write code for the underlying plumbing or mechanics.
Actually, adding annotations to Spring was done grudgingly. According to Rod Johnson, head of Interface21 and inventor of the Spring framework, annotations are not terribly needed in Spring because its XML configuration files are much simpler than those of Java EE. The difference is that most of the underlying mechanics are already taken care of by the Spring framework itself.
By contrast, Johnson claims that annotations could add as many problems as they were designed to solve. Annotations are tied to the [Java] class, not the instance of the class, he said. That means that you could conceivably wind up with proliferating annotations each time you used the same Java class in a different context. The result could become a new tangle of spaghetti code that becomes hard to manage.
At this point, Interface21 has no plans to support PHP, another popular web scripting language. It would be possible, and since we support JSR 223 [Scripting for the Java Platform], maybe there is some PHP integration already out there. But, surprisingly, Johnson added, Wee haven’t seen much interest.
Interface21 is also introducing a new version of its WebFlow framework, which manages the back and forth interactions between user and web app. It expands on the fact that Java includes a state machine, which tracks the status of a session, but it does not get into any more detail in modeling the ways that users click through a web app.
The new version of WebFlow, 1.1, adds support for Java Server faces (JSF). In effect, WebFlow adds metadata to JSF that takes snapshots of the state of the server as the user is clicking refresh or back buttons, or clicking on the different links inside a web app.
Both Spring 2.1 and WebFlow 1.1 frameworks are being release in beta form in time for the JavaOne conference in the next couple weeks, and should be out in final form in June.