The Study of Ajax and Other Interesting Web Technologies

Java

The final version of Groovy 1.6 is now available for download. For those who don't know, Groovy is a scripting language hosted on the JVM with many of the features that Java programmers may find themselves missing--optional/dynamic typing and closures to name two--but with a syntax that is still very familiar for Java programmers. It is a natural complement to Java for tasks like GUI or web application development.

Beyond the many bug fixes and improvements in 1.6, the major focus of the release was performance, which had been somewhat of an Achilles heel for the language in the past--especially when compared to the more aggressively optimized JRuby. Groovy 1.6 sports a performance improvement of somwhere between ~150% and 460% (and yes, all the usual caveats about micro-benchmarking do apply), a solid boost that should mollify some of the performance objections to using the language.

Other useful features of the release include:

The ability to create annotations in Groovy (previously had to be done in Java)

Multiple assignments, e.g. def (a, b) = [1,2]

Abstract Syntax Tree (AST) tranformations, which give the developer the ability to hook into the compilation process before code is turned into bytecode--examples include @Singleton for making a class into a singleton, @Immutable for making instances immutable

Sun has released version 1.1 of the JavaFX platform, which now includes JavaFX Mobile (previous releases were JavaFX Script only). Partners listed for JavaFX include Sony Ericson, LG Electronics, Orange, Sprint, Cynergy and MobiTV.

The SDK and other tools (including the dedicated version of Netbeans 6.5 with the JavaFX plugin) are available from the JavaFX site.

Sun has released the newest version of the Java runtime, Java 6 u12. Earlier versions of the language, Java 5 and 1.4.2, have also been revved to 1.5.0_17 and 1.4.2_19 respectively. Most notable in this release is 64-bit support as well as support for Windows 2008. There are also a number of bug fixes and performance enhancements (especially to JavaFX) as described in the release notes here.

I ran into a problem recently while programming in Java where I wanted to define an interface method that returned a generic type which was tied to the type of the implementing class. If that sounds a little long-winded, let me give an example...

Let's say we have a Thing interface that defines a method for getting a type token, public Class<T> getType(). The Thing interface has several implementers, MyThing, YourThing, HisThing, HerThing, and so on. How does one make sure that T is the right subtype in the interface, which has no "knowledge" of its implementers (the same could be said of any base class and subclass as well)? Actually, the answer was sitting right under my nose in the core java libraries themselves, in the Enum class, whose declaration looks like this:

public abstract class Enum<E extends Enum<E>>

The E generic type looks a little confusing at first, like a kind of recursive definition. But when you think about it, it makes perfect sense: E is a subclass of an Enum type that is generified with the type--what else?--E. And E must be the appropriate subtype in any implementing class. So getting back to our little example, I could now retrofit my Thing interface to look like:

Most programmers prefer to think of generics only in the context of collections. But this provides a good example of how generics can establish type relationships in ways that are not possible in more traditional OOP methodology.

The Apache Ivy project, now a subproject of Ant but formerly a product of Jayasoft, has released version 2.0 of its dependency management solution for Ant build files. It is the first stable release of Ivy since becoming a full-fledged subproject of Ant.

The release features increased compatibility with Maven 2.0, improved cache management, a new "packager" resolver, and better handling of relative paths. Ivy has become an excellent tool for those unable (or unwilling) to move to Maven, but unable to live without dependency management (though there is also Maven's own Ant tasks).

Ivy 2.0 is available for download here. The IvyDE Eclipse plug-in (essentially an editor for ivy.xml files and a classpath container for your dependencies) is also available through the update site:

The 5.0.18 version of Apache Tapestry has been christened as the first release of Tapestry 5. The release is the capstone of long effort to re-write the web application framework from scratch, removing a lot of the complexity of previous releases toward a more POJO and annotations-driven approach (and making it non-backward compatible with version 4, a sore point for some current Tapestry users).

For those who don't know, Tapestry is a component-based web application framework (one of the original) for Java similar to JSF or Wicket.

Tapestry template pages are now valid XHTML (with a custom namespace for Tapestry), making them easier to work with, especially when round-tripping between designers and programmers (an approach similar to Wicket's)

Sun has released an early version of an Eclipse plug-in for JavaFX. It's still a bit buggy, but it's an opportunity for developers to kick the tires. The functionality is roughly equivalent to that of the Netbeans plugin.

Instructions on how to use the plug-in are here. You should use the download page here, though, to get the actual plug-in itself.

JBoss has released version 5.0 of its popular Java application server, completing a 3 year odyssey to redesign its microkernel architecture (the JBoss Microcontainer). JBoss AS 5 is designed around the concept of a "Virtual Deployment Framework", an AOP-based design that analyzes deployments and produces metadata to be consumed by the container itself, which in turn instantiates and wires together the various pieces of a deployment, controlling their lifecycle and dependencies. The server also integrates other projects from the JBoss umbrella, including JBoss Cache and JBoss WS.

JBoss AS 5.0 is a fully JEE 5.0 compliant application server. It can be run on both Java 5 and 6. After this release, the JBoss team now moves on to JEE 6.0.

Sun has just released the JavaFX platform, consisting of 3 major pieces: the JavaFX SDK, the Netbeans 6.5 IDE with JavaFX, and the JavaFX Production Suite (formerly Project Nile), a set of tools to allow designers the ability to import digital assets from design tools such as Photoshop and Illustrator.

All are available for download on the JavaFX site, which was redesigned (thankfully) for the launch.

As noted in the Sun blogs, JavaFX Mobile is currently in beta and expected to be released in February.