JW Soapbox: JavaServer Faces 2.0 is in good hands

[复制链接]
查看11 | 回复5 | 2007-1-24 12:56:49 | 显示全部楼层 |阅读模式
JW Soapbox is a community forum for talking about what matters in Java-based software development today. In this first Soapbox column, PrettyFaces author and OcpSoft Principal Lincoln Baxter III reflects on his experience of getting involved with JSR 314: JavaServer Faces 2.0.
A lot has changed since May 15, 2001, when the first JSF ballot review of the JSF 1.0 framework was just beginning. JSF to this day -- Sun's flagship Web-application framework -- has been an uncompromising box of tricks and gotchas, with little community adoption. This has been mostly due to its relatively developer-unfriendly nature; however, the second phase is coming, and with JSF 2.0 peeking out from the edge of its nest, a new life is beginning to show.
From the start, JSF had mixed support from the community, with opposition from major players like IBM, HP, and the Apache Foundation. Apache voiced strong concerns with the new JSF, because of "Sun's current position that JSRs may not be independently implemented under an open source license." In addition, they saw "little value in recreating a technology [Struts] in a closed environment that is already available in an open environment."
Apache's concerns drew several other players to vote against JSF, but the final vote still passed with a 10-5 margin (Accenture abstained from voting). With the voting complete a short two weeks later, the first JSF expert group was formed.
This article was originally published on the OcpSoft Blog, on February 10, 2009.
Three months after the formation of the expert group, the first JCP community review was complete, and Sun's new star Web-framework was on its way to reality. On the side of the box was a label, which read, "Final release, May 2004: Warranty Void if Removed" It was done, and their hands were off.
回复

使用道具 举报

千问 | 2007-1-24 12:56:49 | 显示全部楼层
But some things that should not have been forgotten, were lost
Since JSF was engineered by companies like IBM and Oracle, major contractors in the industry, most of the emphasis was placed on creating a modular architecture that could be "easily extended" and broken down into components. While technically sound, and well designed for large companies where developers are part of an assembly line, the community at large found JSF hard to use.
JSF lacked life-cycle extension; there are six defined phases, and if you need to add another one, you're out of luck. Also lacking was easy component creation -- Creating a component in JSF today requires modification of no fewer than four separate files, even more if you use a separate renderer class. You were on your own if you wanted to validate multiple form fields against each other.
Navigation rules were ungainly, and difficult to follow logically without a visual editor. Community documentation was almost a joke. Sun's mailing list and forum are still the best places to find help. There are some very knowledgeable people, but nowhere to be found is what most developers find most useful: a central, persistent resource for documentation. I like PHP's model -- official documentation with community feedback in comments below.
The lack of bookmarking support is one of the most highly-criticized facets of JSF, which is where I got involved, leading me to create the PrettyFaces URL rewriting extension. If you need to be convinced of the collective dysfunction on this topic, look at the results of a Google search for "jsf bookmark." Yet, at the root of all this was something JSF lacked until very recently -- something very important.
回复

使用道具 举报

千问 | 2007-1-24 12:56:49 | 显示全部楼层
Where are my bookmarks?
Ahh yes.
After learning about JSF2 in mid-October, I've been following very closely the changes and discussions around its new architecture, and how it can be "fixed." At the top of the wish list, among other contenders like "Fixing Navigation Rules," and even above "Simplified component development," is one very near to my heart: "Enhanced support for GET requests."
I began work on PrettyFaces before learning that JSF2 was in progress, but not before I had evaluated the other options available from the community. JBoss Seam had a UrlRewriting feature, but I found it cumbersome, requiring too much configuration, and the added burden of learning the entire Seam framework was too much for me. RestFaces was an alternative that I tried for a while, but several design choices made it difficult to incorporate in a non-invasive way, and I was left writing lines and lines of code in order to compensate for its (albeit few) shortcomings.
Shocked, disappointment struck when I was contacted by a PrettyFaces user, disheartened, who urged me to contact the JSF2 expert group because they were close to abandoning bookmarking support for the next release, a full five years after the last specification update. How could they be considering omitting such a critical feature? It would surely finish off whatever damage had been done by the first eight years of JSF's mis-managed life, and it would be dead forever. "Long live Struts," Apache would tout.
回复

使用道具 举报

千问 | 2007-1-24 12:56:49 | 显示全部楼层
New life
But fate struck, and before I could even begin to write emails, begging for reconsideration, I got another pop-up from my inbox.
From: Dan J. Allen - Jan 10, 2:50pm
Lincoln,
Hey there. I have recently joined the JSF EG by way of my employment with Red Hat. My first action was to submit a couple of proposals to make JSF more "website friendly". After all, that is what got me interested in Seam in the first place.
In the most recent proposal, I cited the statements you made in a recent blog post. I have attached that proposal to this e-mail as well as a related proposal. We are listening (at least those of us at Red Hat) and we are trying our best to improve JSF within the boundaries that we have to work (i.e., the JCP). The JSF EG was definitely dysfunctional in the past, but Ed Burns, Red Hat, and a handful of other members have really started to turn things around. Adding pretty URLs is definitely too big of a change at this point given the time constraints, but you may find these two proposals to satisfy many of your other concerns. Feel free to provide feedback to the JSF EG regarding the design changes.
-Dan
回复

使用道具 举报

千问 | 2007-1-24 12:56:49 | 显示全部楼层
Dan is the author of Seam in Action, and from my interactions with him, a brilliant individual. If he isn't rich already, in heart or on paper, he will be someday.
Struck by two emails on this subject in the same day, I "hurriedly" (from 11pm-2am) typed a response. Someone at RedHat was asking me for my feedback? Talk about an ego trip. My friends at work won't let me hear the end of it.
The proposal was stunning. While still omitting Pretty URL rewriting, it contained in depth solutions for using query-string parameters (http://url?key=value) to bookmark pages within JSF. But it lacked page-load actions, but that would follow, as we talked through the issues, in the next few days.
During the process of reviewing Dan's proposals, providing feedback where I could, and wishing I weren't just a part-time contributor, we worked through issues regarding usability, convention over configuration, and strategies for implementing the new functionality that would be required. Two weeks and 91 emails later, we had a draft of the spec, and off it went (via Pete Muir at RedHat) to the Expert Group for review.
The proposal was accepted; Dan's job got even better. Within a week, he would have to implement his proposed specification, create a sample application, make any necessary changes to the spec, submit it back to the EG, and believe me, it was good.
回复

使用道具 举报

千问 | 2007-1-24 12:56:49 | 显示全部楼层
Things yet to come.
JSF2 is still under review, and all of these changes may yet be changed, but I'm confident that the people in charge have heads on their shoulders, and that they are pointing in the right direction.
I'm impressed. Impressed by Dan Allen, Jim Driscoll, Ryan Lubke, and by Sun for starting to recognize that its developer community is its best chance at survival. JSF2 won't have everything that we've asked for, but it will have the most critical features that the community has asked for. I'm impressed that it's turning out so well: Component writing is truly easy; pages will be bookmark-able; templating is built in; and annotations are on the way to deprecating faces-config.xml for trivial tasks.
What should we talk about next?
JW Soapbox is an open forum for discussing what matters in Java-based application development. Recommend a topic -- and don't forget to share your views on this month's topic using the Comments form below.
So what can Sun do next? Well. For starters, keep listening. Don't limit ideas to people on its payroll. JSF2 will be a success if Sun gives users a voice.
The developer blogs are great, but we need a centralized place for core documentation. The site needs to be fast, and you should be able to easily register and contribute. Yes, it will take management and oversight, but we aren't out to hurt anyone. Dear sun: "We like what you're doing, and the direction in which we think you might be turning. We're here to further the cause of software development, and guess what ... If you listen to us ... we'll do it for free."
Whether or not this happens, the future of JSF is in our hands.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行