|By David Geary||
|August 19, 2004 12:00 AM EDT||
"Whatever you do, don't use JSF. Not yet anyway." Those were the closing words of a devastating blog recently called "My JSF Experience" by J2EE consultant Matt Raible. "JSF is a technology that's likely to succeed," Raible added later - but his main beef with JavaServer Faces was clear: "Plain and simple, it does not simplify Web development."
This spurred the following spirited response from a member of the JSF Expert Group, David Geary. ("I do not speak for the group" when making these comments, Geary notes.)
David Geary writes:
"Matt starts out by saying:
Ouch! I don't know what Matt thinks is problematic in the spec, because that's the last time he mentions it in his post. The list of complaints that follow in Matt's article refer to implementation-specific details of Sun's RI and MyFaces and some other things such as lack of JSF support, but nothing about the spec. So I'm not sure how to respond to that.
Of all the MVC Frameworks I've developed with in the last few weeks (Struts, Spring MVC, WebWork and Tapestry) - JSF was by far the worst. And it's not the implementations that are the problem, it's the spec itself (as far as I can tell). Plain and simple, it does not simplify Web development.
Also, I don't think that one of JSF's top priorities is to simplify Web development. Certainly that's a laudable goal, but you have to understand that JSF is: Web App Framework + Components + Event Model. That makes it considerably more complex than Struts, for instance, which is simply a framework. Also, JSF was designed primarily for use with tools, although I don't think that coding JSF apps by hand is necessarily more difficult than other frameworks of similar complexity (for instance, Tapestry). I'm sure Howard Lewis-Ship would take exception to that last assumption, but I think it's a pretty accurate statement.
Before I address Matt's specific complaints, let me say two things. First, JSF is not perfect and the Expert Group is well aware of its shortcomings, which we're working on for the next version. Remember, JSF is 1.0 (1.1 actually, but 1.1 is just a bug-fix release); I think Matt would've had a much different perception of JSF if he'd compared it against the 1.0 versions of Struts, Tapestry, etc.
Second, I'm not sure that spending a few days implementing a simple application in each framework is really enough to allow someone to recommend one framework over another. That said, I do think there is some value in such a comparison, but it's not the best vehicle for recommending one framework over another.
Now I'll address Matt's specific complaints:
MyFaces handles duplicate posts nicely. If you hit "reload" on your browser after saving a record, you get presented with an empty form rather than a duplicate record. I believe I got a duplicate record with Sun's RI.
The JSF RI is not very good at handling duplicate posts. It's something we're working on for 1.2.
The ability to specify an "action" attribute on a button (or a link) and them map that action to a page (in faces-config.xml) is pretty cool.
Yes it is!
Every button or link clicked results in a form post. That's just wrong - why can't I have true links like the web is supposed to? So much for bookmarks.
You can have true links: see the h:outputLink tag. For buttons, you can do <h:commandButton type="button"/>, which will give you a push button, not a submit button.
Saving state on the client results in enormously long URLs and/or hidden fields.
That's an implementation-specific detail of the RI (and perhaps MyFaces). The spec itself doesn't specify exactly how client-side state saving needs to be implemented. Also, remember that state saving is pluggable in JSF. If you don't like the way it works with your framework, you can plug in your own implementation.
JSF support is fairly non-existent. Unlike the other MVC frameworks, the MyFaces mailing list has hardly any traffic and the Sun forums aren't much better.
I can't speak for the MyFaces mailing list, but the JSF forum at Sun is quite active. See http://forum.java.sun.com/forum.jsp?forum=427.
I did find some CRUD examples, like this this one, but was disappointed to find that i18n is not considered for setting success messages. I ended up using the solution described in this post. 6 lines of code to set a success message - you've got to be kidding me! Most frameworks have a simple 1-2 liner.
This is the result of two competing forces when designing frameworks: the desire to provide the kitchen sink and the desire to provide a simple API. You can't have both, and this is one area where we deliberately chose to leave out functionality. In fact, you will find other cases (like accessing request parameters) that may seem to be more work than is necessary. I would suggest that you encapsulate those 6 lines in a utility class of your own, which reduces it to one line going forward. Of course, the cost of those 6 lines lies in figuring out how to do it in the first place. You can obviate that need by using good utility classes that someone else has already written. You can find such classes at http://www.corejsf.com.
Waiting for JSPs to compile the first time has surprisingly become painful after using Tapestry, Velocity and FreeMarker for the last 2 weeks.
JSF desperately needs to support an alternative display technology besides JSP out of the box. In fact, it's much uglier than simply having to wait for JSP pages to compile. See Hans Bergsten's article "Improving JSF by dumping JSP" at onjava.com.
Validation messages are ugly. For instance, when a required field isn't filled in, I get: "lastName": Value is required. I was able to override the default messages, but I was never able to use the label of the field (vs. the field's id).
The standard messages are indeed ugly, but it's a cinch to replace them. You should be able to use the field's label.
The <h:messages> tag is practically worthless. Sure it's great for displaying messages (error and success), but that's about it. It has a "layout" attribute that doesn't even work in Sun's RI, and in MyFaces it just wraps a <span> with a <ul><li> or a <table>. Both of these layouts are useless b/c you can't set a css class on them. I ended up using "table" and having to set a generic CSS rule (width: 100%) in order to get the message/error bar to show across the top of my page. This tag also doesn't allow you to escape HTML.
The h:messages tag could certainly be improved, but the layout attribute does work in Sun's RI and you can set a CSS class on them. See the end of chapter 4 in Core JSF. (I'm convinced that Matt needs a good JSF book!)
The h:dataTable component is nothing like the displaytag. MyFaces claims to have a pageable/sortable component, but it requires custom logic/methods in your managed-bean. Yuck. I ended up using <h:dataTable>, which has neither sorting or paging. This is only because I couldn't get an <h:commandLink> working inside a displaytag column.
h:dataTable could definitely use some attention.
Testability is another area that could use some improvement. At least actions can be implemented in POJOs (unlike Struts), which means that you can test business logic with JUnit.
Finally, Matt mentions that he felt like he was banging his head against the wall with both Tapestry and JSF. I would assert that trying to come up to speed with any framework in a couple of days will result in considerable weeping and gnashing of teeth."
|Doctor 03/22/05 07:03:26 AM EST|
I had practical experience with JSF 1.1 for three month.
By the way, anybody knows any JSF-based professional commercial projects?
|Clare 09/24/04 07:24:03 AM EDT|
I've never used JSF so I can't offer my own perspective, but after reading the article, I'm left with the impression that many of Raible's issues are still valid.
Also, I was wondering if Geary meant "cinch" where the article says "sinch", and "assert" where it says "ascertain."
|Raj Madhuram 08/24/04 03:16:42 PM EDT|
Check this out:
|Renat Zubairov 08/22/04 05:49:30 AM EDT|
I like this place in the article "You can obviate that need by using good utility classes that someone else has already written." - for me it sounds like "We''ve created a very nice API, yeah, it isn''t really usable, but there UTILITY classes someone (not us) have written, so just use them"
|Dan 08/20/04 06:07:36 PM EDT|
They said wait till next version in EJB. We are still waiting. The most important thing said is "Simplicity is not a goal of JSF".
I don''t think Sun is capable of producing an easy to use software development tool. This will place an upper limit on Java''s growth.
|Alexander Jesse 08/20/04 09:08:54 AM EDT|
Well. I really like Struts. And JSF is in the beginnings. If you look at what happened since this spring, you must say that it is taking off well.
The main advantages of JSF are (my opinion): 1) the component orientation which already leads to the first component market for a Java-web presentation framework. And allows for your own custom components. 2) IDE-friendliness which will somewhat ease the learning curve for average programmers. Even though each team should have an expert on board or standing by close.
The options: If you need to get your app out in two weeks: stick to what you know. If you can invest a few weeks in experimenting and foresee other projects in a similar problem domain: jump on the JSF-wagon.
|Matt Raible 08/20/04 05:34:36 AM EDT|
Kito Mann and David have said the same thing: I've stated I have a problem with the specs, but there's not much proof in my post.
I'll agree with you both. The few minor issues I
I hope these issues are fixed soon b/c I do think JSF has potential. It
simply doesn't meet my meager requirements to write a basic webapp.
|Kito Mann 08/20/04 05:30:34 AM EDT|
Matt Raible says that the problem is with the specification, not the implementations. However, the only points he makes that are related to the specification are the requirement for form posts and the lack of a simple way to internationalize application-generated messages. (By the way, you can create normal hrefs using the HtmlOutputLink component (), but they can''t execute actions. Most of the issues you mentioned were either specific implementation bugs or issues with specific component implementations. It''s fair to point out that the standard UI components are useful, but they''re really only the tip of the iceberg. Several companies (including Oracle and several smaller companies) either have, or will, be introducing better components. It''s also fair to note that JSF is newer than the other frameworks you''ve used, so you can''t expect the same amount of traffic in the on-line forums.
Kito D. Mann Author, JSF in Action
|toto 08/19/04 09:51:49 AM EDT|
I think Raible is too in love with struts to have a clear sight on what''s going on. I tested recently JSF, and having had not so much pleasure practising struts, I can say I prefer JSF. It requires a little bit more words to get something work, but I like the global approach, and I can feel it will *probably* win the game. We should remember that Craig R. McClanahan, creator of struts and major contributor of the JSF specs, recommends the migration to JSF.
|Aris 08/19/04 09:39:44 AM EDT|
I just finished a project using JSF. I learned it along the way. I recommend other web application projects to use it, but only after the developers have read the spec. There is a learning curve for JSF that is just as high as it was for Struts two years ago when I knew Struts was a crappy way to do web apps. But that''s not the case for Struts now. I can develop web apps easier,better,faster with JSF because I a software developer, not because JSF is filled with magic pixie dust.
|Armin 08/19/04 09:08:06 AM EDT|
I was trying to use JSF with struts using struts-faces and myfaces implementation. But after banging the whole day...it seems to me that JSF is still not matured..no clear information...no clear documentation (Like Struts). I can''t believe that Craig R. McClanahan is also on the JSF Reference Imple. Working with JSF is not worth at the moment. Vote for Matt Raible.
|Vic 08/19/04 09:04:48 AM EDT|
They said wait till next version in EJB. We are still waiting. The most important thing said is "Simplicity is not a goal of JSF". .V
|Dim 08/19/04 08:43:46 AM EDT|
SYS-CON Events announced today that SoftLayer, an IBM Company, has been named “Gold Sponsor” of SYS-CON's 18th Cloud Expo, which will take place on June 7-9, 2016, at the Javits Center in New York, New York. SoftLayer, an IBM Company, provides cloud infrastructure as a service from a growing number of data centers and network points of presence around the world. SoftLayer’s customers range from Web startups to global enterprises.
Sep. 25, 2016 01:00 PM EDT Reads: 802
There is little doubt that Big Data solutions will have an increasing role in the Enterprise IT mainstream over time. Big Data at Cloud Expo - to be held November 1-3, 2016, at the Santa Clara Convention Center in Santa Clara, CA - has announced its Call for Papers is open. Cloud computing is being adopted in one form or another by 94% of enterprises today. Tens of billions of new devices are being connected to The Internet of Things. And Big Data is driving this bus. An exponential increase is...
Sep. 25, 2016 12:45 PM EDT Reads: 2,346
DevOps at Cloud Expo, taking place Nov 1-3, 2016, at the Santa Clara Convention Center in Santa Clara, CA, is co-located with 19th Cloud Expo and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. The widespread success of cloud computing is driving the DevOps revolution in enterprise IT. Now as never before, development teams must communicate and collaborate in a dynamic, 24/7/365 environment. There is no time to wait for long dev...
Sep. 25, 2016 12:15 PM EDT Reads: 3,362
Digital innovation is the next big wave of business transformation based on digital technologies of which IoT and Big Data are key components, For example: Business boundary innovation is a challenge to excavate third-party business value using IoT and BigData, like Nest Business structure innovation may propose re-building business structure from scratch, as Uber does in the taxicab industry The social model innovation is also a big challenge to the new social architecture with the design fr...
Sep. 25, 2016 12:15 PM EDT Reads: 1,067
Data is an unusual currency; it is not restricted by the same transactional limitations as money or people. In fact, the more that you leverage your data across multiple business use cases, the more valuable it becomes to the organization. And the same can be said about the organization’s analytics. In his session at 19th Cloud Expo, Bill Schmarzo, CTO for the Big Data Practice at EMC, will introduce a methodology for capturing, enriching and sharing data (and analytics) across the organizati...
Sep. 25, 2016 11:45 AM EDT Reads: 1,630
IoT is fundamentally transforming the auto industry, turning the vehicle into a hub for connected services, including safety, infotainment and usage-based insurance. Auto manufacturers – and businesses across all verticals – have built an entire ecosystem around the Connected Car, creating new customer touch points and revenue streams. In his session at @ThingsExpo, Macario Namie, Head of IoT Strategy at Cisco Jasper, will share real-world examples of how IoT transforms the car from a static p...
Sep. 25, 2016 11:30 AM EDT Reads: 1,496
The vision of a connected smart home is becoming reality with the application of integrated wireless technologies in devices and appliances. The use of standardized and TCP/IP networked wireless technologies in line-powered and battery operated sensors and controls has led to the adoption of radios in the 2.4GHz band, including Wi-Fi, BT/BLE and 802.15.4 applied ZigBee and Thread. This is driving the need for robust wireless coexistence for multiple radios to ensure throughput performance and th...
Sep. 25, 2016 11:00 AM EDT Reads: 1,489
The many IoT deployments around the world are busy integrating smart devices and sensors into their enterprise IT infrastructures. Yet all of this technology – and there are an amazing number of choices – is of no use without the software to gather, communicate, and analyze the new data flows. Without software, there is no IT. In this power panel at @ThingsExpo, moderated by Conference Chair Roger Strukhoff, panelists will look at the protocols that communicate data and the emerging data analy...
Sep. 25, 2016 11:00 AM EDT Reads: 1,548
SYS-CON Events announced today that China Unicom will exhibit at the 19th International Cloud Expo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA. China United Network Communications Group Co. Ltd ("China Unicom") was officially established in 2009 on the basis of the merger of former China Netcom and former China Unicom. China Unicom mainly operates a full range of telecommunications services including mobile broadband (GSM, WCDMA, LTE F...
Sep. 25, 2016 10:30 AM EDT Reads: 1,691
The Transparent Cloud-computing Consortium (abbreviation: T-Cloud Consortium) will conduct research activities into changes in the computing model as a result of collaboration between "device" and "cloud" and the creation of new value and markets through organic data processing High speed and high quality networks, and dramatic improvements in computer processing capabilities, have greatly changed the nature of applications and made the storing and processing of data on the network commonplace.
Sep. 25, 2016 10:15 AM EDT Reads: 838
Video experiences should be unique and exciting! But that doesn’t mean you need to patch all the pieces yourself. Users demand rich and engaging experiences and new ways to connect with you. But creating robust video applications at scale can be complicated, time-consuming and expensive. In his session at @ThingsExpo, Zohar Babin, Vice President of Platform, Ecosystem and Community at Kaltura, will discuss how VPaaS enables you to move fast, creating scalable video experiences that reach your...
Sep. 25, 2016 10:00 AM EDT Reads: 903
Big Data has been changing the world. IoT fuels the further transformation recently. How are Big Data and IoT related? In his session at @BigDataExpo, Tony Shan, a renowned visionary and thought leader, will explore the interplay of Big Data and IoT. He will anatomize Big Data and IoT separately in terms of what, which, why, where, when, who, how and how much. He will then analyze the relationship between IoT and Big Data, specifically the drilldown of how the 4Vs of Big Data (Volume, Variety,...
Sep. 25, 2016 10:00 AM EDT Reads: 950
SYS-CON Events announced today that Pulzze Systems will exhibit at the 19th International Cloud Expo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA. Pulzze Systems, Inc. provides infrastructure products for the Internet of Things to enable any connected device and system to carry out matched operations without programming. For more information, visit http://www.pulzzesystems.com.
Sep. 25, 2016 09:45 AM EDT Reads: 1,771
If you’re responsible for an application that depends on the data or functionality of various IoT endpoints – either sensors or devices – your brand reputation depends on the security, reliability, and compliance of its many integrated parts. If your application fails to deliver the expected business results, your customers and partners won't care if that failure stems from the code you developed or from a component that you integrated. What can you do to ensure that the endpoints work as expect...
Sep. 25, 2016 09:00 AM EDT Reads: 1,544
WebRTC adoption has generated a wave of creative uses of communications and collaboration through websites, sales apps, customer care and business applications. As WebRTC has become more mainstream it has evolved to use cases beyond the original peer-to-peer case, which has led to a repeating requirement for interoperability with existing infrastructures. In his session at @ThingsExpo, Graham Holt, Executive Vice President of Daitan Group, will cover implementation examples that have enabled ea...
Sep. 25, 2016 08:00 AM EDT Reads: 1,491
Almost two-thirds of companies either have or soon will have IoT as the backbone of their business in 2016. However, IoT is far more complex than most firms expected. How can you not get trapped in the pitfalls? In his session at @ThingsExpo, Tony Shan, a renowned visionary and thought leader, will introduce a holistic method of IoTification, which is the process of IoTifying the existing technology and business models to adopt and leverage IoT. He will drill down to the components in this fra...
Sep. 25, 2016 08:00 AM EDT Reads: 1,517
The Internet of Things can drive efficiency for airlines and airports. In their session at @ThingsExpo, Shyam Varan Nath, Principal Architect with GE, and Sudip Majumder, senior director of development at Oracle, will discuss the technical details of the connected airline baggage and related social media solutions. These IoT applications will enhance travelers' journey experience and drive efficiency for the airlines and the airports. The session will include a working demo and a technical d...
Sep. 25, 2016 08:00 AM EDT Reads: 1,672
SYS-CON Events announced today the Enterprise IoT Bootcamp, being held November 1-2, 2016, in conjunction with 19th Cloud Expo | @ThingsExpo at the Santa Clara Convention Center in Santa Clara, CA. Combined with real-world scenarios and use cases, the Enterprise IoT Bootcamp is not just based on presentations but with hands-on demos and detailed walkthroughs. We will introduce you to a variety of real world use cases prototyped using Arduino, Raspberry Pi, BeagleBone, Spark, and Intel Edison. Y...
Sep. 25, 2016 06:30 AM EDT Reads: 2,810
Technology vendors and analysts are eager to paint a rosy picture of how wonderful IoT is and why your deployment will be great with the use of their products and services. While it is easy to showcase successful IoT solutions, identifying IoT systems that missed the mark or failed can often provide more in the way of key lessons learned. In his session at @ThingsExpo, Peter Vanderminden, Principal Industry Analyst for IoT & Digital Supply Chain to Flatiron Strategies, will focus on how IoT de...
Sep. 25, 2016 05:30 AM EDT Reads: 1,008
Fact is, enterprises have significant legacy voice infrastructure that’s costly to replace with pure IP solutions. How can we bring this analog infrastructure into our shiny new cloud applications? There are proven methods to bind both legacy voice applications and traditional PSTN audio into cloud-based applications and services at a carrier scale. Some of the most successful implementations leverage WebRTC, WebSockets, SIP and other open source technologies. In his session at @ThingsExpo, Da...
Sep. 25, 2016 04:45 AM EDT Reads: 1,523