是否可以将 Primefaces 和 Richfaces 结合到一个 Web 应用程序中?

发布于 2024-11-09 05:31:24 字数 186 浏览 2 评论 0原文

在阅读了 RichFaces Vs PrimeFaces(为了性能)之后,我很想在我的 Web 应用程序中使用这两种方法来获得两者的最大利益。

你认为这可能吗?有什么优点和缺点?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

七堇年 2024-11-16 05:31:24

两者都是很棒的组件库。你绝对可以将它们结合起来。但这里的 1+1=2 并不正确。更多的是1*1=1。您确实应该更仔细地研究这两个组件库。您究竟需要 RichFaces 提供哪些 PrimeFaces 无法提供的功能?您究竟需要 PrimeFaces 提供哪些 RichFaces 无法提供的功能?您需要自己找到合适的平衡点。一个网络应用程序不是另一个。

至于优点/缺点,这是相当主观的。你自己去和他们玩吧。先各自分开,然后一起。自己的经历就是最好的经历。我本人在 PF 2.1 方面获得了很好的体验。 PF 2.2 在数据表组件中存在一些严重问题。我还没有尝试过 PF 3.0。我目前正在开发一个使用一些 RF 3.3 组件的项目,我们正在将其升级到 RF 4.0。我只能说它是一个相当不错的组件库,具有良好的文档。完整的 PF 文档不再免费提供。

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.

伴梦长久 2024-11-16 05:31:24

我的回答是“不”。您最好选择其中之一。存在很多兼容性问题。例如,我花了两天时间修复了 rich:fileUpload 的错误。最后,我在我的 pom.xml 中评论了 primefaces(仅使用了 primefaces 中的几个组件),然后一切正常。

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.

清君侧 2024-11-16 05:31:24

从 RF 4.5.7 和 PF 5.2 开始,答案是“否”。存在 jQuery 冲突,这意味着某些 PF 控件无法工作。五年来,他们一直在讨论解决这个问题,但似乎没有任何解决方案。

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.

花桑 2024-11-16 05:31:24

我看了两者,最终选择了 PrimeFaces。 V 2.2 的文档现在是付费的(我想大约 9 美元),可以让您快速上手。

其实我在评估的时候确实尝试过一次。我在同一页面上有 PrimeFaces 和 RichFaces。它有效,但我主要关注组件的样式和外观。例如,我没有尝试使用来自同一页面上两个包的组件的 AJAX 请求。由于它们都基于“本机”JSF 实现,因此它应该可以工作,但我不会指望它。

选择其中之一,并坚持下去。为自己省点悲伤吧。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文