views:

6715

answers:

11

I have an existing JSF application (Tomcat 6, MyFaces, JSF 1.2, Tomahawk, JSP) and we are looking at adding AJAX to existing pages.

1 What is the best framework you have used.

2 What issues have you had.

I have stated looking at Richfaces, and just started looking at Icefaces Thanks.

A: 

Dojo seems like the right choice for the task

look at http://dojotoolkit.org/

and a nice article about it from Sun:

http://java.sun.com/javaee/javaserverfaces/ajax/tutorial.jsp

Sakin
hmmm this looks like a javascript library which does not integrate into JSF I would need to create custom components when ever I wanted to use this functionality. I'm more looking for a set of JSF components that I can use.Thanks.
David Waters
A: 

MyFaces has build in AXAJ solution via partialSubmit and partialTriggers. You can do anything with it although sometimes it requires some background work. We are using it her at work and it works out pretty well so we don't need no other solutions.

See http://myfaces.apache.org/trinidad/devguide/ppr.html for details

GHad
I tried the Trinidad extra components (not for ajax) in January 2008 and found them buggy and over weight. I was not very impressed, I was so glad when I managed to remove these jars from my project I'm not sure I would re add them in a hurry.
David Waters
I don't know about extra components but as I mentioned, the buildin mechanisms are pretty good. I managed to get table row and column edit working per ajax request as well as accordions and live filtering/autosuggest.
GHad
+1  A: 

I already use IceFaces, and it seems pretty good. It irons out a few problems with JSF and provides you very easy AJAX.

I don't think you have to do very much to change an application over from basic JSF to IceFaces - however, we pretty much started out with IceFaces on teh app I'm currently working on so I don't know what it's like to change over a big application.

I'd definitely suggest giving it a try - we have had a few issues but the forum has been quite good at resolving them. And being open-source it means you can delve into code yourself if you come across probelms - but I rarely have to do that!

I haven't tried RichFaces but I believe IceFaces has the edge on features. As far as I am aware, RichFaces doesn't yet have server-initiated rendering? - which is a very useful feature for long running jobs, etc.

Phill Sacre
A: 

I like RichFaces, it makes stuff like autocomplete text inputs and form prefilling pretty easy, and there's enough things like scriptaculous and jQuery integration that make it flashy if you want that.

Problems:

I'd say my biggest issue with Richfaces is that the HTML it renders isn't always the nicest-looking stuff. There's nested tables and lots of custom CSS classes in the HTML and changing the look and feel to something custom takes some doing. The library provides custom skins, though, so if you like any of those, it will work out well.

Evgeny
+2  A: 

A good place for pure data on this is http://www.jsfmatrix.net/ this has a large list of projects and features with tick boxes

David Waters
+3  A: 

There are basically three ways you can add ajax to your JSF apps. 1. Write your own javascript on the component renderer- takes more time but gives you more control. 2. Use javascript library like jquery, dojo, prototype - reduces development time. 3. Use AJAX-JSF frameworks ike aja4jsf (or now richfaces), jMaki - easy to implement in existing JSF pages.

Here is a good summary of the presentation given by one of the prominent person in this field and on which this post relies on - http://chrisschalk.com/presentations/indicthreads07/cschalk-jsf-ajax-indicthreads07.pdf

One of the problem using AJAX-JSF frameworks is ajax request going through the full JSF lifecyle. Bypassing or short-circuiting may cause security vulnerabilities if not properly implemented.

royalGhost
+14  A: 

We currently are using MyFaces and were also looking to integrate an AJAX framework. We went through quite a big product selection/prototyping phase using the frameworks found at http://www.jsfmatrix.net/.

I can tell you that the results were not all that promising. Your best bet is Richfaces, but you'd better make sure you are using their JSF 1.2 stream as the 1.1 stream is not really that well supported. There is quite good support in their forums to help with the many quirks but an indication of the maturity here is that between the 3.2.1 and 3.2.2 versions there were 589 bug fixes. Performance is also a huge problem as every page is parsed by their framework before displaying whether it has a richfaces tag on it or not adding about 20% to our page load time for all pages.

Despite all this, it's still by far the best framework. Icesfaces would be great if you didn't have to integrate it with anything. They have a very different take on things though. There are some trinidad components that include partial triggering updates, but these are pretty badly supported and old. The other frameworks are really nothing more than hacks.

Go with Richfaces.

bwobbones
A: 

I must agree that RichFaces is probably the best Ajax JSF framework

Shervin
A: 

Richfaces (+facelets) is in my experience (based on 3 application in production) the best way to go in the jsf world.

ivans
A: 

I have used both RichFaces and ICEFaces. RichFaces is the best imo

dfuse
A: 

Our company uses RichFaces and they are quite good (and have powerful functionality), but be prepared for a bit of a learning curve. The documentation is not especially great, but the amount of controls (and frequency of updates) is nice.

Demo of controls & functionality: http://livedemo.exadel.com/richfaces-demo/richfaces/jsFunction.jsf?c=jsFunction&tab=usage

Best of luck

Jon