Just got back from the April NEJUG meeting on JavaServer Faces, which didn’t go so smoothly. The projector lamp went out about 10 minutes into the presentation, which left David Geary with no access to his slides for about 1.5 hours. He gracefully answered questions instead of going through his presentation; following are excerpts of the questions & answers I found intriguing. Hopefully he’ll post his slides, although the OnJava.com newsletter mentioned that JSF is *the* hot topic for the next couple months so I’m sure there is going to be apt coverage elsewhere.
· David was one of the original developers of Tiles, which was highlighted in the Struts in Action book I’ve read. It didn’t originally float my boat, but I should go back and look into it a bit more. On Oreilly: Programming Jakarta Struts: Using Tiles, Part 1, Part 2, Part 3, Part 4.
· 1 sentence summary of JSF: It’s Struts++ with an event model and components.
· On the record Sun will say that JSF doesn’t replace Struts, off the record it does.
· Also off the record, David mentioned that JSF might be (or is) the most expensive JSR ever.
· Lots of people were curious about how closely tied JSF was to JSP. The short answer is that it’s not, David mentioned that you simply need to ‘… create a new renderer..’ for whatever platform you are targeting. He mentioned multiple times that JSF is platform independent and that you could output to XUL, Swing or Midlets. Which makes me wonder how hard it would be to write a JSF application that outputs to Flex or Laszlo. Swing & Midlets though? I could be wrong, but I think what it actually does it create *data* that these platforms can then use. I don’t think you can create an application in JSF and then write a J2ME renderer that creates a jar file that you can deploy to a phone. Tell me if I’m wrong on that though, because it would be remarkable otherwise.
· Couple questions about the similarities between Webforms & ASP.NET. Some differences I picked up:
a) the tags and UI components aren’t browser aware, they don’t target a specific browser platform, which is different from ASP.NET (which will output different HTML depending on which browser is requesting data).
b) by default form data is persisted to session scope (is this really true?) although I don’t see how this is an improvement over Struts (which has form persistence already if you use the Struts <html:form> tags)
· Question re: the complexity of JSF: easier or harder to learn than Struts? David replied that he thought that newbies to each would take longer to learn JSF. Struts users should have an easier time learning how to use it.
· Question re: migrating from Struts to JSF: Take a look at the document Craig McClanahan put together here, Struts-Faces integration library
· Question re: Tapestry & WebWork: Both were definitely looked at during the JSR process, turns out the Tapestry guy is local to Boston.
· JSF supports 2 types of events: action events (which are fired onclick of a button or a link) and change events (which are fired when the value of an input component changes). Both require a round trip to the server, change events require the user to click on a submit button OR the developer to write a JavaScript onchange event handler to then fire the form submission process. This is different than ASP.NET, where you can declare onchange events in your ASP.NET tags and the corresponding JavaScript is automatically generated for you. Whether this is good or bad depends on how much you like the generated code, but it definitely makes it easier for people who don’t know anything about JavaScript).
· Question re: debugging: is it easier than Struts? No.
· David mentioned a couple times that he thought that Tomcat sucked and that he really likes Resin. Note to self: check out Resin
· The WebSphereâ„¢ Boston Users Group will be doing a presentation entitled “WSAD, JSF, and More” on April 29th. More information here.
That’s it for now.
Update 04/15/2004: The presentation files are now available on the NEJUG site.