|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 Men & Mice, the leading global provider of DNS, DHCP and IP address management overlay solutions, will exhibit at SYS-CON's 18th International Cloud Expo®, which will take place on June 7-9, 2016, at the Javits Center in New York City, NY. The Men & Mice Suite overlay solution is already known for its powerful application in heterogeneous operating environments, enabling enterprises to scale without fuss. Building on a solid range of diverse platform support,...
Feb. 9, 2016 06:15 AM EST Reads: 167
As enterprises work to take advantage of Big Data technologies, they frequently become distracted by product-level decisions. In most new Big Data builds this approach is completely counter-productive: it presupposes tools that may not be a fit for development teams, forces IT to take on the burden of evaluating and maintaining unfamiliar technology, and represents a major up-front expense. In his session at @BigDataExpo at @ThingsExpo, Andrew Warfield, CTO and Co-Founder of Coho Data, will dis...
Feb. 9, 2016 05:30 AM EST Reads: 148
Fortunately, meaningful and tangible business cases for IoT are plentiful in a broad array of industries and vertical markets. These range from simple warranty cost reduction for capital intensive assets, to minimizing downtime for vital business tools, to creating feedback loops improving product design, to improving and enhancing enterprise customer experiences. All of these business cases, which will be briefly explored in this session, hinge on cost effectively extracting relevant data from ...
Feb. 9, 2016 05:00 AM EST
SYS-CON Events announced today that Pythian, a global IT services company specializing in helping companies adopt disruptive technologies to optimize revenue-generating systems, has been named “Bronze Sponsor” of SYS-CON's 18th Cloud Expo, which will take place on June 7-9, 2015 at the Javits Center in New York, New York. Founded in 1997, Pythian is a global IT services company that helps companies compete by adopting disruptive technologies such as cloud, Big Data, advanced analytics, and DevO...
Feb. 9, 2016 04:45 AM EST Reads: 176
SYS-CON Events announced today that iDevices®, the preeminent brand in the connected home industry, will exhibit at SYS-CON's 18th International Cloud Expo®, which will take place on June 7-9, 2016, at the Javits Center in New York City, NY. iDevices, the preeminent brand in the connected home industry, has a growing line of HomeKit-enabled products available at the largest retailers worldwide. Through the “Designed with iDevices” co-development program and its custom-built IoT Cloud Infrastruc...
Feb. 9, 2016 04:45 AM EST
With an estimated 50 billion devices connected to the Internet by 2020, several industries will begin to expand their capabilities for retaining end point data at the edge to better utilize the range of data types and sheer volume of M2M data generated by the Internet of Things. In his session at @ThingsExpo, Don DeLoach, CEO and President of Infobright, will discuss the infrastructures businesses will need to implement to handle this explosion of data by providing specific use cases for filte...
Feb. 9, 2016 04:30 AM EST Reads: 138
SYS-CON Events announced today that VAI, a leading ERP software provider, will exhibit at SYS-CON's 18th International Cloud Expo®, which will take place on June 7-9, 2016, at the Javits Center in New York City, NY. VAI (Vormittag Associates, Inc.) is a leading independent mid-market ERP software developer renowned for its flexible solutions and ability to automate critical business functions for the distribution, manufacturing, specialty retail and service sectors. An IBM Premier Business Part...
Feb. 8, 2016 03:00 PM EST Reads: 579
SYS-CON Events announced today that Alert Logic, Inc., the leading provider of Security-as-a-Service solutions for the cloud, will exhibit at SYS-CON's 18th International Cloud Expo®, which will take place on June 7-9, 2016, at the Javits Center in New York City, NY. Alert Logic, Inc., provides Security-as-a-Service for on-premises, cloud, and hybrid infrastructures, delivering deep security insight and continuous protection for customers at a lower cost than traditional security solutions. Ful...
Feb. 8, 2016 02:00 PM EST Reads: 382
SYS-CON Events announced today that Interoute, owner-operator of one of Europe's largest networks and a global cloud services platform, has been named “Bronze Sponsor” of SYS-CON's 18th Cloud Expo, which will take place on June 7-9, 2015 at the Javits Center in New York, New York. Interoute is the owner-operator of one of Europe's largest networks and a global cloud services platform which encompasses 12 data centers, 14 virtual data centers and 31 colocation centers, with connections to 195 ad...
Feb. 8, 2016 12:45 PM EST Reads: 362
SYS-CON Events announced today that Commvault, a global leader in enterprise data protection and information management, has been named “Bronze Sponsor” of SYS-CON's 18th International Cloud Expo, which will take place on June 7–9, 2016, at the Javits Center in New York City, NY, and the 19th International Cloud Expo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA. Commvault is a leading provider of data protection and information management...
Feb. 8, 2016 10:45 AM EST Reads: 390
The cloud promises new levels of agility and cost-savings for Big Data, data warehousing and analytics. But it’s challenging to understand all the options – from IaaS and PaaS to newer services like HaaS (Hadoop as a Service) and BDaaS (Big Data as a Service). In her session at @BigDataExpo at @ThingsExpo, Hannah Smalltree, a director at Cazena, will provide an educational overview of emerging “as-a-service” options for Big Data in the cloud. This is critical background for IT and data profes...
Feb. 8, 2016 09:30 AM EST Reads: 162
With the Apple Watch making its way onto wrists all over the world, it’s only a matter of time before it becomes a staple in the workplace. In fact, Forrester reported that 68 percent of technology and business decision-makers characterize wearables as a top priority for 2015. Recognizing their business value early on, FinancialForce.com was the first to bring ERP to wearables, helping streamline communication across front and back office functions. In his session at @ThingsExpo, Kevin Roberts...
Feb. 7, 2016 12:00 PM EST Reads: 358
SYS-CON Events announced today that Fusion, a leading provider of cloud services, will exhibit at SYS-CON's 18th International Cloud Expo®, which will take place on June 7-9, 2016, at the Javits Center in New York City, NY. Fusion, a leading provider of integrated cloud solutions to small, medium and large businesses, is the industry's single source for the cloud. Fusion's advanced, proprietary cloud service platform enables the integration of leading edge solutions in the cloud, including clou...
Feb. 6, 2016 03:30 PM EST Reads: 740
Most people haven’t heard the word, “gamification,” even though they probably, and perhaps unwittingly, participate in it every day. Gamification is “the process of adding games or game-like elements to something (as a task) so as to encourage participation.” Further, gamification is about bringing game mechanics – rules, constructs, processes, and methods – into the real world in an effort to engage people. In his session at @ThingsExpo, Robert Endo, owner and engagement manager of Intrepid D...
Feb. 5, 2016 09:00 PM EST Reads: 800
Eighty percent of a data scientist’s time is spent gathering and cleaning up data, and 80% of all data is unstructured and almost never analyzed. Cognitive computing, in combination with Big Data, is changing the equation by creating data reservoirs and using natural language processing to enable analysis of unstructured data sources. This is impacting every aspect of the analytics profession from how data is mined (and by whom) to how it is delivered. This is not some futuristic vision: it's ha...
Feb. 2, 2016 02:00 PM EST Reads: 421
WebRTC has had a real tough three or four years, and so have those working with it. Only a few short years ago, the development world were excited about WebRTC and proclaiming how awesome it was. You might have played with the technology a couple of years ago, only to find the extra infrastructure requirements were painful to implement and poorly documented. This probably left a bitter taste in your mouth, especially when things went wrong.
Feb. 2, 2016 04:30 AM EST Reads: 863
Learn how IoT, cloud, social networks and last but not least, humans, can be integrated into a seamless integration of cooperative organisms both cybernetic and biological. This has been enabled by recent advances in IoT device capabilities, messaging frameworks, presence and collaboration services, where devices can share information and make independent and human assisted decisions based upon social status from other entities. In his session at @ThingsExpo, Michael Heydt, founder of Seamless...
Feb. 1, 2016 05:00 AM EST Reads: 955
The IoT's basic concept of collecting data from as many sources possible to drive better decision making, create process innovation and realize additional revenue has been in use at large enterprises with deep pockets for decades. So what has changed? In his session at @ThingsExpo, Prasanna Sivaramakrishnan, Solutions Architect at Red Hat, discussed the impact commodity hardware, ubiquitous connectivity, and innovations in open source software are having on the connected universe of people, thi...
Jan. 31, 2016 09:00 PM EST Reads: 740
WebRTC: together these advances have created a perfect storm of technologies that are disrupting and transforming classic communications models and ecosystems. In his session at WebRTC Summit, Cary Bran, VP of Innovation and New Ventures at Plantronics and PLT Labs, provided an overview of this technological shift, including associated business and consumer communications impacts, and opportunities it may enable, complement or entirely transform.
Jan. 31, 2016 07:15 PM EST Reads: 1,159
There are so many tools and techniques for data analytics that even for a data scientist the choices, possible systems, and even the types of data can be daunting. In his session at @ThingsExpo, Chris Harrold, Global CTO for Big Data Solutions for EMC Corporation, showed how to perform a simple, but meaningful analysis of social sentiment data using freely available tools that take only minutes to download and install. Participants received the download information, scripts, and complete end-t...
Jan. 31, 2016 10:00 AM EST Reads: 1,231