There is a lot of well-founded buzz around HTML5 but I assert that nearly all of it stems from how HTML5 enables the UI authoring experience to focus entirely on the browser, instead of on server-side processing that delivers content to the browser. For years, I've been making the case that building a web application is really building a distributed application, and therefore the art is finding the best allocation of processing tasks (UI, persistence, business logic, security, etc.) to processing nodes (smartphoe, tablet, laptop, desktop, browser, server, etc). The emergence of HTML5 as a viable deployment platform changes how we answer the question of "where does the User Interface processing task go?" My goal with this blog entry is to shed some light on what this means for JSF.
Ever since the addition of the
<form> element to HTML+ in 1993developers have been trying to force the pace of innovation delivered by browser vendors in order to deliver more and more compelling applications while lowering development/deployment/maintenance costs. Two factors have historically influenced this trend: ubiquity and capability. As soon as enough people had reasonably capable browsers, server side frameworks, such as JSF stepped in to give developers what they'd been wanting since 1993: "yeah, this browser stuff is nice, but what if I want to make my own darn tags? How can I do that?"
So where does that leave JSF 2.2? As you may know, HTML 5 is a huge specification and it addresses many different categories of content. We are still very early in the development of JSF 2.2 but I can state we plan to address elements in the following content categories.
JSF applications already have large amounts of metadata available to them. We need to find the best way to allow that data to naturally express itself via the corresponding capability in HTML5.
Just as the lightweight ontology of section values in HTML5 was obtained by searching google for how people were using their div tags, the same idea can be applied to how people are using their facelet templates.
We're still working on delivering a revision of the spec that ties up all the loose ends left over from JSF 2.1 such as
<f:viewAction />, Cross Site Request Forgery protection, and File uploads. Once the Early Draft Release milestone has been reached, we can start to think more seriously about what to do with HTML5.
Technorati Tags: edburns
If you want to try out the absolute latest Mojarra 2.2-SNAPSHOT, you can run it on GlassFish 3.1 or GlassFish 3.1.1. To install it, grab the 2.2.0-SNAPSHOT version of Mojarra from this repository.
<repository> <id>jvnet-nexus-snapshots</id> <name>jvnet-nexus-snapshots</name> <url>https://maven.java.net/content/repositories/snapshots/</url> </repository>
<dependency> <groupId>org.glassfish</groupId> <artifactId>javax.faces</artifactId> <version>2.2.0-SNAPSHOT</version> <scope>provided</scope> </dependency>
Once you download the
javax.faces.jar, you must take some steps to install it in GlassFish 3.1 or 3.1.1.
javax.faces.jar in the
You must modify the
default-web.xml file in
lib/templates. In each directory, remove any mention of
jsf-impl.jar from the
default-web.xmlfile. In place of the two jars, add a reference to
Once Mojarra 2.2.0-SNAPSHOT has been installed in your GlassFish 3.1.1 or GlassFish 3.1 container, you can use the 2.2-SNAPSHOT verson of the javax.faces-war-archetype, which is just like the previous one except that it depends on the 2.2-SNAPSHOT version of the JSF API. You must always include the
-DarchetypeRepository argument to mvn because SNAPSHOT artifacts are never pushed to maven central.
mvn archetype:generate -DarchetypeGroupId=javax.faces -DarchetypeArtifactId=javax.faces-war-archetype -DarchetypeVersion=2.2-SNAPSHOT -DarchetypeRepository=https://maven.java.net/content/repositories/snapshots/
This blog entry signifies the culmination of the effort of many individuals from many disciplines over the years. I would like to thank them all for finally allowing official Java jars to flow into Maven Central.
Technorati Tags: edburns
As mentioned in the Editor’s Blog, java.net artifacts are finally available in Maven Central. This includes the official JCP/JavaEE artifacts, being published by the official steward of Java technology. This blog entry brings to your attention a few points about using these artifacts, as well as introducing a simple archetype that the Mojarra team uses to facilitate the creation of automated regression tests.
I am not at all in the position to comment on maven best practices, but one problem I’ve run into is the effect of bitrot on a maven build. This can sometimes result in a complicated assortment of repository entries leading to the lack of a clear understanding of how your dependencies are being satisfied. Now that the official JavaEE artifacts are all in maven central, you can omit the repository declaration entirely from your projects, relying on a mirror declaration in your settings.xml file, if necessary. If you are developing a Java EE 6 application, all of the compile time dependencies can be satisfied from a single artifact, in maven central.
It is important to note that this dependency was declared with
<scope>provided</scope> This is the only way you can use this dependency because the jar has been stripped of all java code and contains only signatures. The actual implementation of JavaEE 6 comes, naturally, from your Java EE 6 compliant container.
If you would rather go à la carte, the individual artifacts for all of the JavaEE technologies are also available, as listed in these tables. The first table lists artifacts that conform to the naming scheme Oracle Architect, and JavaEE Titan, Bill Shannon. The scheme is documented at <http://wikis.sun.com/display/GlassFish/Maven+Versioning+Rules>.
The remaining jars do not conform to the naming scheme, but are useful for compilation nonetheless.
If you want to use JSF 2.1, which was released after JavaEE 6, it is necessary to explicitly place a compile time dependency on that artifact before the javaee-api 6.0 dependency.
Oracle GlassFish Server 3.1.1 <http://glassfish.org/> contains an implementation of JSF 2.1.
Because we now have these artifacts in maven central, it is possible for us to finally add archetypes that use them. This first archetype creates a simple war project that depends on JSF 2.1 and JavaEE 6.
mvn archetype:generate -DarchetypeGroupId=javax.faces -DarchetypeArtifactId=javax.faces-war-archetype -DarchetypeVersion=2.1
A subsequent post will document the use of another artifact, for the very latest JSF version, 2.2-SNAPSHOT.
This blog entry signifies the culmination of the effort of many individuals from many disciplines over the ears. I would like to thank them all for finally allowing official Java jars to flow into Maven Central.
Technorati Tags: edburns