Mojarra和MyFaces之间的区别 [英] Difference between Mojarra and MyFaces

查看:117
本文介绍了Mojarra和MyFaces之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从JSF2.0开始,我使用了一个教程作为参考,但是我有以下问题:

I am starting on JSF2.0 I used a tutorial as a reference but I have the following question:

该教程仅使用了2个库:Mojarra Project中的jsf-api.jarjsf-impl.jar(但也带有JSTL).

The tutorial used 2 libs only: jsf-api.jar, jsf-impl.jar (but also had JSTL) from Mojarra Project.

我也尝试下载它们,但似乎该站点无法访问. 因此,我使用了Apache MyFaces,但要运行该示例,我必须添加8个jar(commons-*myfaces-*).
如果使用MyFaces,为什么还需要更多的罐子?我应该更喜欢Mojarra作为打火机吗?另外,下载页面确实是 JSF Mojarra 吗?

I tried to dowload them also but seems the site is not reachable. So I used Apache MyFaces but to run the example I had to add 8 jars (commons-*, myfaces-*).
Why do I need more jars if I use MyFaces? Should I prefer Mojarra as lighter? Also the download page is indeed JSF Mojarra?

谢谢

推荐答案

如果使用MyFaces,为什么还需要更多的罐子?

因为这些commons-*依赖项未捆绑在MyFaces中.另一方面,如果您使用的是来自Apache.org的其他库,这些库也使用了这些commons-*依赖项,那么最终最终将得到较小的库.

Because those commons-* dependencies are not bundled in MyFaces. On the other hand, if you're using other libraries from Apache.org which also use those commons-* dependencies, then you ultimately end up with smaller total size libraries.

请注意,自Mojarra 2.1.6起,可以使用单个JAR文件格式javax.faces.jar.

Noted should be that since Mojarra 2.1.6 a single JAR file format javax.faces.jar is available.

我是否应该更喜欢Mojarra

这是一个非参数.您应该查看JSF实现的健壮性和维护良好性.

This is a non-argument. You should look at how robust and well maintained the JSF implementation is.

Mojarra的祖父,Sun JSF RI 1.0和RI 1.1的早期版本都被令人讨厌的错误所困扰.在那一刻(大约2004-2006年),MyFaces绝对是更稳定的选择.

The grandfather of Mojarra, Sun JSF RI 1.0, and the early versions of RI 1.1 were cluttered by nasty bugs. At that moment (around 2004-2006), MyFaces was definitely the more stable alternative.

自2006年初开始1.1_02和1.2_02以来,新的Sun/Oracle JSF开发团队就做了出色的工作.不仅具有错误修复,而且还具有性能增强. Mojarra 1.2生命周期的一半左右(大约在2007年至2009年),Mojarra比MyFaces更好.

Since 1.1_02 and 1.2_02 around early 2006 the new Sun/Oracle JSF dev team did great work. Not only with bugfixing, but also with performance enhancements. About halfway the Mojarra 1.2 lifetime (around 2007-2009), Mojarra was the better choice than MyFaces.

自从JSF 2.0附带了新的部分状态保存管理以来,MyFaces在性能方面是更好的选择,这是因为它采用了一种不同且效率更高的方法来计算状态增量,尤其是在使用大型组件树时. Mojarra仅在版本 2.1.22 .在2.0/2.1时间轴期间,Mojarra仅遇到 Flash作用域的实现(最初的实现完全不是防弹的). MyFaces也有自己的错误集,但它们是可管理的.

Since JSF 2.0, which came with new partial state saving management, MyFaces was performance wise the better choice due to a different and much more efficient approach of calculating state deltas, particularly when using large component trees. Mojarra caught up only since version 2.1.22. During the 2.0/2.1 timeline, Mojarra had only serious issues with <ui:repeat> in complex/nested compositions (a.o. broken state saving, processing only last iterated form, failed <f:ajax>, etc) and with flash scope implementation (initial implementation was totally not bullet proof). MyFaces also had its own set of bugs, but they were manageable.

现在,在JSF 2.2中,不能真正预先说出哪个更好.错误通常只在以后才暴露出来,而健壮性只能在之后进行评估.只要选择您认为最佳的实现即可.浏览他们的问题报告( MyFaces

Right now, with JSF 2.2, one can't really say beforehand which one is better. Bugs often expose only later and robustness can only be evaluated during the aftermath. Just pick whatever implementation you "feel" is the best. Browse through their issue reports (MyFaces and Mojarra) to learn about the previously fixed issues and the currently open issues. If you encounter a specific bug, try with both implementations to exclude the one and other. Report if necessary to keep the overall quality of the both implementations high.

下载页面确实是 JSF Mojarra ?

他们的主页已经移动了好几次.当前(2017年9月)它位于 https://javaserverfaces.github.io 中,您可以在 org.glassfish:javax.faces .您可以在GitHub中的 javaserverfaces/mojarra项目中找到源代码.您可以在 README.md 中找到安装说明.

Their homepage has been moved around several times. Currently (Sep 2017) it's located at https://javaserverfaces.github.io You can find the libraries in org.glassfish:javax.faces in Maven Central too. You can find the source code in javaserverfaces/mojarra project in GitHub. You can find the installation instructions in the README.md over there.

  • What are the main disadvantages of Java Server Faces 2.0?
  • What is the difference between JSF implementations and component libraries

这篇关于Mojarra和MyFaces之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆