网络编程 | 站长之家 | 网页制作 | 图形图象 | 操作系统 | 冲浪宝典 | 软件教学 | 网络办公 | 邮件系统 | 网络安全 | 认证考试 | 系统进程
Firefox | IE | Maxthon | 迅雷 | 电驴 | BitComet | FlashGet | QQ | QQ空间 | Vista | 输入法 | Ghost | Word | Excel | wps | Powerpoint
asp | .net | php | jsp | Sql | c# | Ajax | xml | Dreamweaver | FrontPages | Javascript | css | photoshop | fireworks | Flash | Cad | Discuz!
当前位置 > 网站建设学院 > 网络编程 > Java
Tag:注入,存储过程,分页,安全,优化,xmlhttp,fso,jmail,application,session,防盗链,stream,无组件,组件,md5,乱码,缓存,加密,验证码,算法,cookies,ubb,正则表达式,水印,索引,日志,压缩,base64,url重写,上传,控件,Web.config,JDBC,函数,内存,PDF,迁移,结构,破解,编译,配置,进程,分词,IIS,Apache,Tomcat,phpmyadmin,Gzip,触发器,socket
网络编程:ASP教程,ASP.NET教程,PHP教程,JSP教程,C#教程,数据库,XML教程,Ajax,Java,Perl,Shell,VB教程,Delphi,C/C++教程,软件工程,J2EE/J2ME,移动开发
本月文章推荐
.手机开发 教您使用JSR172解析XML.
.浅析Java语言中两种异常使用的差.
.爪哇语言工厂方法创立性模式介绍.
.java表达式中类型的自动提升.
.用JBuilder7开发一个简单的J2EE .
.Java繁体中文处理完全攻略.
.初学Java注意什么?.
.Java的模板引擎Velocity初体验.
.使用JSF和MyFaces实现文件上载.
.一个关于抛出异常的程序代码的分.
.在Java EE环境下使用Kodo EJB.
.应用Rational 工具简化基于J2EE的.
.使用StopWatch类来计时.
.菜鸟初学Java的备忘录之Applet.
.eclipse-SDK-3.1M4-win32.
.java获取本机的ip地址.
.Java咖啡馆(2)——第一杯咖啡.
.Jakarta Struts应用的七个经验(.
.Javascript实例教程(19) 使用HoT.
.Java学习之神奇的i=i++.

JavaServer Faces (JSF) vs Struts

发表日期:2008-1-5



  A brief comparison
October 19, 2004
Summary
My JSF article series and Meet the EXPerts appearance on IBM developerWorks received a lot of feedback. I would have to say, the most common question or feedback came along the lines of comparing Struts to JSF.


My JSF article series and Meet the Experts appearance on IBM developerWorks received a lot of feedback.

I would have to say, the most common question or feedback came along the lines of comparing Struts to JSF. I thought it would be a good idea to compare JSF to Struts by evaluating various features that an application architect would look for in a Web application framework. This article will compare specific features. Those on which I will focus include:

Maturity
Controller Flexibility/Event Handling
Navigation
Page development
Integration
Extensibility
Certainly, there are other places in which you might want to do a comparison, sUCh as performance, but I'll focus on the set I just mentioned. I'll also spend more time on the Controller and Navigation sections because they are the heart of the frameworks. Performance of JSF is specific to the vendor implementation, and I always encourage people to perform their own performance tests against their own set of requirements because there are too many factors that can affect performance. A performance evaluation would be unfair. Other areas such as page layout, validation, and exception handling were also left out in the interest of saving space.
Maturity
Struts has been around for a few years and has the edge on maturity. I know of several successful production systems that were built using the Struts framework. One example is the WebSphere Application Server Web-based administrative console. JavaServer Faces(JSF), however, has been in draft for 2 years. Several companies, including IBM as well as the creator of Struts, Craig McClanahan, have contributed to the creation of JSF during that time. Nonetheless, it will take some time to see a few systems deployed.
Struts definitely has the edge in this category. With JSF, however, you can rely on different levels of support depending on which implementation you choose. For example, the JSF framework inside WebSphere Studio comes with IBM support.



Controller Flexibility/Event Handling
One of the major goals of Struts was to implement a framework that utilized Sun's Model 2 framework and reduced the common and often repetitive tasks in Servlet and jsp development. The heart of Struts is the Controller. Struts uses the Front Controller Pattern and Command Pattern. A single servlet takes a request, translates HTTP parameters into a Java ActionForm, and passes the ActionForm into a Struts Action class, which is a command. The URI denotes which Action class to go to. The Struts framework has one single event handler for the HTTP request. Once the request is met, the Action returns the result back to the front controller, which then uses it to choose where to navigate next. The interaction is demonstrated in Figure 1.
上一篇:JavaServer Faces 简介 人气:684
下一篇:java版的MD5 人气:3794
浏览全部Java的内容 Dreamweaver插件下载 网页广告代码 祝你圣诞节快乐 2009年新年快乐