Skip to main content

It's Coming... [Very] Soon

Posted by jhook on July 31, 2005 at 9:24 PM PDT

I was a JavaOne virgin; I didn't know what to expect. I had been contributing to the JavaServer Faces specification and the reference implementation for quite some time, but was looking forward to finally meeting everyone involved in person. Tell you what, the folks from Sun are some of the nicest people I've ever met professionally.

I made a point to try to make it to sessions that I felt would most apply to my job (including JBI), but often times I ended up wandering over to the web framework presentations. It's no wonder why they spark so much interest and debate as it's the keystone to your application's stack-- where everything is finally orchestrated and labeled as a finished product.

I'm probably digressing a bit, because I would like to talk about JavaServer Faces and how it's evolving. I was really dissapointed to read David Geary's blog, where he mentions being a contributing expert on the original JSF specification, and in the same entry put JSF off as overly vendor oriented as if the framework didn't 'get it right'. I think his blog failed to mention all the opportunity within JSF (although he wrote he would blog more on the topic). Thousands of people attended JavaServer Faces-related presentations at JavaOne and the reason is the potential that the platform provides. AJAX (sorry Dan), alternate view technologies, toolability, controller options such as Shale or Spring MVC, and specialized components just to name a few.

I keep on referring to JavaServer Faces as a platform. Anyone that attened Kito Mann's BOF at JavaOne, the guy went on for an hour with all of the options and additions that you can use with JSF. People compare JSF to Tapestry, Ruby on Rails, Spring, and Struts, but the clear point for everyone is that the JSF platform could use any of the aforementioned technologies or replicate their capabilities.

I gave a presentation last June in Minneapolis on the web tier alignment (which I will get to ;-)), but I emphasised the possiblities that developers could take and run with. Right now you could tie in Spring on numerous levels within JSF, you could easily develop EJB3-backed components to give you Ruby on Rails 'scaffolding' functionality, you can integrate Shale into your development for extended controller functionality, or you could start using JSF with frameworks like Facelets for Tapestry-like features.

One of the major events to occur for JEE 5, was the web-tier alignment between JSP, EL, and JSF. Some of the features to come from this alignment are:

  • EL Resolution
    This really takes the cake. The new EL spec allows you to chain (via composition), resolution for both variables and properties. You could chain variable resolution with Spring along side your own backing-bean framework, and then add a special property resolver within EL for handling custom domain model objects.
  • Variable Scopes
    It seemed to me that a majority of issues posted for JSF came from JSP use. Within JEE 5, JSP and JSF will share the same variable context (mentioned above) so 'things will work' as everyone expects them to through rendering and building component trees.
  • JSTL Use
    Now piggy-backing the EL specification, things like <c:forEach/> will now work in conjunction with JSF component tags. A new version of JSTL is being rev'ed up to accomodate JSF, but to those familiar to JSTL, you won't be seeing any change since it's all under the covers of the JSP tags.
  • JSE 5 Support
    While it's still on the table as to how it will be used in certain parts of JEE 5, it wouldn't take a rocket scientist to be able to add annotation support to UIComponents in order to 'automate' state management and rendering for you.
  • Anything Else?
    JSP 2.1 and JSF 1.2 made lots of other enhancements to their specifications, but I simply wanted to bullet JEE 5's committment to making things easier for developers while opening a flood gate of possibilities as a platform.

Where do you go from here? Well there's a couple options available to you depending on your needs as a developer and your project deadlines:

  • Start Using JEE 5 Now's Glassfish project offers you great opportunity to start using JSF 1.2 and JSP 2.1, along with the rest of the JEE 5 stack. The developers working on Glassfish are the same folks that contributed to the wildly popular Tomcat container. For those that are looking for an easy to use container, the Glassfish web-based administrative console is both beautiful and simple to navigate.
    • Getting started is just as easy as with Tomcat, read more here on getting your first war deployed.
    • Glassfish developers answer questions in minutes (it's ridiculous) and you can join the mailing lists here to get immediate support.
  • Try Facelets
    There was a lot of great work done to correct issues between JSP and JSF and for those that can't rev up to JEE 5 any time soon, then Facelets will offer you the same advantages in the web-tier. Facelets will work with both the JSF RI and Apache MyFaces while allowing you to start using JSF 1.2. The framework is founded on making things easy for the developer and comes with templating features and EL support.
    • Lots of documentation is here, which gives you a taste of the templating and Tapestry-like features.
    • Facelets includes a 'developer' mode which takes some of the black-box issues away with screens like this.
    • Lastly, I've gotten great feedback from folks such as Mike Kienenberger, Matthias Weßendorf, and Bing Ran-- please join the mailing lists and get involved in this new technology! Mike already proved how easy it is to get custom components integrated in Facelets without any extra coding.

Related Topics >>