Search |
||
The Fit and Finish of JSFPosted by cayhorstmann on May 29, 2009 at 7:44 AM PDT
Now, admittedly, I am biased. I am a co-author of the best-selling JSF book, with David Geary, published by Sun Press. I am making lots of pennies on the Safari page views and a few dollars from the hardy souls who, bless their hearts, still buy the paper version. But frankly, there are easier ways of making a buck than writing a JSF book. I wouldn't do it if I didn't think JSF was (or, at least could be) the cat's pajamas. We all know that JSF is far from perfect. Too much stuff in the HTTP session. Component authoring is way too hard. A leaky abstraction. The stack trace from hell.
But what really bugs me is the overall lack of “fit and finish.” Sometimes, JSF feels like one of those lower end American cars that make up much of the rental car fleet. Cheap, mismatched buttons. Gaudy metallic plastic that comes off when you stare at it too hard. Here is a random example, one of many: JSF 2.0 has a new feature for locating resources. It's pretty nice. You dump
images, CSS files, scripts, and so on, into subdirectories of a
<h:graphicImage library="images" name="myimage.png"/> Or, as my coauthor inexplicably prefers, <h:graphicImage value="#{resource['images:myimage.png']}"/>
As it happens, I have a command button with an image. Wanting to be
thoroughly modern, I move the image to the <h:commandButton image="#{resource['images:myimage.png']}" .../>
Of course, it doesn't work. The value of
The JSF 1.0 expert group had to worry about big and important things such as
the pluggability of the state manager, and nobody paid much attention when
I know, it's no big thing, and I can work around it. It's just like that rattling piece of plastic in the rental car. And I don't want to make fun of the JSF expert groups. They are very knowledgeable and have solved hard problems in constrained time frames. My beef is with the process.
With this process, cruft is bound to accumulate. JSF is not the only culprit. Apparently, all is not well in the land of servlets. And that's a much simpler spec. I think the process needs a couple of tweaks
Again, I don't want to bash JSF. There are lots of nifty things in JSF 2.0, and I see no really compelling alternative to it. (If there was, everyone would just flock to it instead of kvetching about JSF.) I just want more fit and finish in JSF 2.1 and 3.0. »
Related Topics >>
Java Enterprise Comments
Comments are listed in date ascending order (oldest first)
Submitted by jdlee on Fri, 2009-05-29 08:43.
Hi, Cay. Loved Core JSF 2nd ed, BTW. :)
To the point, I think you raise some valid concerns, but I'm not sure I agree with all one of your conclusions. (I should note, probably, that I'm on the JSF 2 EG in case that matters. Probably not, but you never know :) I think a better emphasized public review might be helpful, but I don't think a 6 month window would work. IMO, we've moved a bit slow in getting 2.0 out the door, though most of that was probably due to the long delay in forming the EG. I think there's ample support for moving more quickly on 2.1 and beyond, so that may help.
The review process *could* probably use a bit more emphasis and, dare I say, formality. We got lots of good feedback during the process, but, given the number of late responses, it seems most people don't bother to look until the last minute. A longer window, then, might not be all that effective. Secondly, I'm not sure how many people are really interested in reading specs that aren't already involved to some degree in the process. As a JSF user, I never read the spec until I started working on Mojarra (that's what your book was for ;). Perhaps that's due to all the "gobbledygook" that goes into a spec, but a spec that lacks precision and pedantry makes it hard to have compatible implementations, it seems to me, so that gobbledygook is somewhat unavoidable. I don't know that much can be done on that front.
On cruft removal, though, I'm solidly on your side. I'd like to see all kinds of cruft removed from all sorts of specs (the Java language, for example). One can't be capricious when removing features/support, but for old, rarely used items, there's little value in maintaining their existence.
At any rate, thanks for the "meta-feedback." I look forward to reading the next edition of Core JSF. :)
Submitted by cayhorstmann on Fri, 2009-05-29 09:05.
Hi Jason, thanks for the quick response.
The expert group always complains that everyone waits "until the last minute", but I don't think that's quite true. It is genuinely difficult to do much complaining until you have a chance to kick the tires, and that requires a reasonably working RI. I am working on the third edition of Core JSF, and it's been the same thing every time. I am very motivated to get the book out as soon as possible, but by the time that I am in a position to suggests meaningful improvements, everyone is either in a mad rush to finish the remaining major features, or the window has passed. I still think that a formal feedback process would do some good.
I wish the spec was uniformly precise and pedantic. I have read many specs in my career, and I am sorry to say that the JSF spec is not of the highest quality. When I say "gobbledygook", I mean those parts that are simultaneously dense and vague. Another symptom of the mad rush to finish.
Like I said, you guys do amazing work, but I really wish that there was a bit more time for "fit and finish" built into the process.
Submitted by pelegri on Fri, 2009-05-29 10:16.
Hi Cay. Have you seen how JAX-RS is being done? What do you think? - eduard/o
Submitted by jdlee on Mon, 2009-06-01 23:35.
Cay,
Fair enough. Getting something out in front of people sooner would probably help a lot. FWIW, I think we'll see MUCH more transparency with 2.1, so maybe we can achieve that.
If you have examples of the gobbledygook, perhaps we can fix (or clarify) those in 2.1. An issue filed against the spec on the issue tracker would help, if you have time for that.
Thanks for all your help.
I'll see if I can find you at JavaOne. ;)
Submitted by jemiller1 on Tue, 2009-06-02 12:09.
I wholeheartedly agree with what you said about fit and finish and how some of the smaller details that matter are overlooked while more complex issues are focused upon. I've noticed this with JAX-WS/JAXB were basic interoperability with other systems like WCF doesn't work, but, the people developing the technology seem to already be focusing all their efforts on other more complex standards. An example would be not being able to mark method parameters and return values as nillable. I don't know how something like that could have been overlooked to begin with. In JSF I would like to see databinding more akin to Flex or Silverlight where you don't need to use special classes such as DataModel. I didn't see any mention of that in the new JSF spec. Usability and fit and finish definitely seem to be overlooked on a lot of fronts in the Java world, not just JSF. Personally, I would like to see the Java community implement a lot of what Microsoft has been doing in terms of ease of use. Luckily IDEs like NetBeans have gotten quite good and are competitive to Microsoft's offering, Visual Studio. However, there are a lot of quite useful features in .NET now like partial classes, properties, events, etc that make things a lot nicer to work with that are missing from Java. I don't know what the deal with JDK 7 is and why it's taking so long to come out. Also, I'm worried that when it does come out a lot of what I'm hoping will be in it in terms of ease of use will still be missing. Also, there are longstanding issues like Tomcat always throwing OutOfMemoryErrors on web app redeploys that at the current rate I NEVER expect to be resolved. It seems absolutely ridiculus to me that this issue wasn't resolved YEARS ago. It makes you question the whole process of having multiple vendors design all this stuff. As far as JSF goes I will be amazed if JSF 2 acheives the ease of use that Microsoft had with ASP.NET back in 2005 or before. And while I'm complaining about everything else, I don't know why Sun had to create a whole new language for JavaFX. Why didn't they just copy Flex and Silverlight and create something like XAML for defining the UI and use a code behind file in Java for the backing code? I can't believe that while Applets have been out for over 10 years that all the sudden Flex and Silverlight are making a joke of it. Java should be the leader here. There are other stupid things like you have to sign your applet if you want to call a web service from it using JAX-WS. This is because JAX-WS reads a system property which isn't allowed in an unsigned applet? Requiring signing for something as simple as making a web service call is absolutely ridiculus and goes back to the lack of fit and finish and usability testing in Java. There are too many road blocks like this and it wastes a lot of developers time. I have had a lot easier time when working with .NET because Microsoft seems to pay much closer attention to the big picture and making sure everything works together as a whole.
|
||
|
|