Is that possible to combine Primefaces and Richfaces in one web application?
开发者_JS百科After reading RichFaces Vs PrimeFaces (for performance), I was tempted to use both in my web application to get the maximum benefit from both.
Do you think that is possible? What are the advantages and disadvantages?
Both are great component libraries. You can definitely combine them. But it is not true that it's 1+1=2 here. It's more 1*1=1. You should really investigate the both component libraries more closely. What exactly do you need from RichFaces which PrimeFaces doesn't offer? What exactly do you need from PrimeFaces which RichFaces doesn't offer? You need to find the right balance yourself. The one webapp isn't the other.
As to advantages/disadvantages, that's pretty subjective. Go play with them yourself. First each separately and then together. Own experience is the best experience. I myself had good experiences with PF 2.1. PF 2.2 had some serious issues in among others the datatable component. I didn't try PF 3.0 yet. I am currently working on a project which uses some RF 3.3 components and we are in a progress to upgrade it to RF 4.0. All I can say is that it's a pretty decent component library with good documentation. The full PF documentation isn't freely available anymore.
My answer is "no". It's better for you choose one of them. There are a lot of compatibility issues. For example, I've spent two days fixing a bug with rich:fileUpload
. Finally, I've commented primefaces in my pom.xml
(only a few components from primefaces were used) and all works fine then.
The answer is 'no' as of RF 4.5.7 and PF 5.2. There are jQuery conflicts which mean that some of the PF controls don't work. They've been talking together about sorting this out for five years but nothing appears to have been resolved.
I looked at both and ended up with PrimeFaces. The documentation for V 2.2 is now paid-for (I think about $9US) and gets you going very quickly.
Actually I did try this once when I was evaluating. I had PrimeFaces and RichFaces on the same page. It worked, but I was mostly looking at how the components were styled and how they looked. I did not try, for example, using AJAX requests from components from both packages on the same page. Since they are both based on the "native" JSF implementation, it should work but I wouldn't count on it.
Pick one of the other, and stick with it. Save yourself some grief.
精彩评论