JSP/Servlet:JSF相对于Struts的一些优点

来源:不详 责任编辑:栏目编辑 发表时间:2013-07-01 11:37 点击:
 

JSF跟Struts的优劣之争已经好久了。相对于Struts,本人更看好JSF,以下是转自exadel的一篇文。
 
Top Ten Reasons to Prefer JSF over Struts
I've got a client who's trying to decide whether to use Struts or JSF. As you might expect, I'm often asked, especially at NFJS symposiums, what the differences are between the two frameworks. And, of course, my client's not alone; quite a few folks are trying to decide which framework to select. 
In general, my advice is to prefer JSF for new projects. There are sometimes compelling business reasons to stay on the Struts path for existing projects and those situations usually call for some close analysis, but let's face it: JSF is much better than Struts. 

So, without further ado, here's my top-10 list of reasons to prefer JSF to Struts... 

Top Ten Reasons to Prefer JSF to Struts 

  1. Components 
  2. Render Kits 
  3. Renderers 
  4. Value Binding Expressions 
  5. Event Model 
  6. Extensibility 
  7. Managed Beans (Dependency Injection) 
  8. POJO Action Methods 
  9. JSF is the standard Java-based web app framework 
  10. There's only one Struts 

#10: There's only one Struts 
Struts is an open-source product, whereas JSF is a specification. That's a subtle distinction, which is often lost on JSF newcomers, but it's significant because we can have numerous JSF implementations. As young as JSF is, we already have two excellent JSF implementations to choose from: the Reference Implementation from Sun and MyFaces, from Apache. On the other hand, there's only one Struts. 

#9: JSF is the standard

JEE 5.0 containers must provide an implementation of JSF, which means that JSF will soon be ubiquitous. That might not matter to you, but it matters to tool vendors. With approximately 50 Java-based web app frameworks, tool vendors have been reluctant to support a particular framework, but a standard is something tool vendors can, and have, rally(ied) behind. But it's not just vendors: open source projects are rallying around JSF with such dizzying speed that they're stepping over one another to implement the same features. For example, I hadn't even heard of Facelets until we were done implementing essentially the same functionality with Shale's Tapestry-like views. 
    发表评论
    请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
    用户名: 验证码:点击我更换图片
    最新评论 更多>>

    推荐热点

    • Java编程语言的八大优点
    • JVM对象生命周期详细介绍
    • Java平台上的CRM系统
    • Java 算数测试小程序
    • Command(命令模式)
    • Java 一个简单的画图程序
    • Java环境 使用Resin在NT环境下配置JSP环境
    • Java 日历的小程序
    • Java 统计代码的小工具

    编程开发导航

    c#Cjava.net移动开发GO语言PerlPython
    网站首页 - 友情链接 - 网站地图 - TAG标签 - RSS订阅 - 内容搜索
    Copyright © 2008-2015 计算机技术学习交流网. 版权所有

    豫ICP备11007008号-1