铁手剑谱

上善若水
数据加载中……
JavaOne2005之框架论剑(评注)
JavaOne Day4的内容之一是Web框架之间的交锋,Struts的 下一代Shale出人意料的拔得头筹,下面是具体的情况:
遗憾的是SpringMVC, ROR没有参与。 
 摘自:TSS

Web Frameworks Shootout

Editor’s Note: This is contributed content, and doesn’t always reflect TSS’ neutrality in such matters. TSS is made up of human editors, of course, and as such, we have biases, but we’d not express them quite this way, nor are we willing to say exactly what those biases are – and no, they’re not often what you might suspect. Let’s leave it at “each framework has its strengths and weaknesses, and each is appropriate for various uses. Thus, we’d be unwilling to stand behind any one framework over another, without detailed and specific requirements for a given implementation.

One of the more interesting talks at Wednesday's JavaONE was the Web Frameworks Shootout hosted on the Esplande level of the Moscone center.  We’ll begin our coverage of this event with an overview of the shoot-out contenders and format.  We will then provide a brief description of the distinguishing points of each framework, followed by a collection of the top quotes and one-liners from the shoot-out.  Finally, we’ll conclude by presenting you with TheServerside.com's own scorecard of how each of the web frameworks faired in the shootout, proclaiming our winners for "Best Business Case" and "Best Technical Case".

The Shoot-Out Contenders:

Frameworks Present:
JavaServer Faces, championed by Ed Burns
Webwork, championed by Jason Carreira
Shale, championed by David Geary
Tapestry, championed by Howard Lewis Ship
Wicket, championed by Eelco Hillenius

Frameworks Conspicuously Absent:
Struts 1.x
SpringMVC
Ruby on Rails

The Shoot-Out Format:

Round 1: Each contender gets 3 minutes to introduce their framework.

Round 2: Questions from the moderator.

Round 3: Questions from the audience.

The Fight Bell: The moderator, Kevin Osborn, controls a fight-bell.  The fight-bell is rung for any “hits below the belt ” or when a contender has used their allowed amount of time.                                                                                                        

Our Commentary:

One of the major trends we noticed during this shootout was the intense focus on components.  Each framework introduced its own flavor of how a web component should work.  The message to the audience is that reusable web components are all the rage… the major point of contention now is what these components should look like.  We couldn’t help notice, however, that Struts was conspicuously missing.  Still, even while Struts wasn’t formally represented, it was clear all represented frameworks were struggling to free themselves from Struts’ shadow, highlighting how they were “different” and “better”.  While web-framework technology may be advancing and leaving Struts behind, Struts is still the present incumbent as the tried and true framework with thousands of successful projects under its belt.  We couldn’t help noticing that Struts doesn’t include this idea of a web component, so for developers looking for reasons to consider these other frameworks, understanding the idea of a web component is a good place to start.

Framework Overviews (Round 1)

JavaServer Faces (JSF)

  • Technical Features
    • First class UI component and event model (其实算起来大家还要感谢Apple的了
    • POJO Dependency Injection (aka Inversion of Control) (最近流行,有什么办法呢?就像SARS一样
    • Client device independence
    • Use with or without tools
    • Externalized Navigation (similar to Struts Navigation)
    • Massively Extensible (witness Shale)
    • Completely Integratable (witness JSF integrated with Spring)
    • Localizable and accessible
  • Market/Business Distinctions
    • Widespread Adoption, including Sun, Oracle, IBM, BEA, Apache, EDS (大腕支持是好,可是代价也不小阿。OS的爱好者们不喜欢)
    • Part of J2EE 5.0 (正宗!标准)
    • Large 3rd party component market (iLog, Business Objects, Oracle, Sun, IBM) (希望看到和.net组件一样火爆的场面)
    • Industry leading tools (Sun Java Studio, Oracle JDeveloper, IBM WSAD, NitroX plugin for Eclipse, Exadel Studio)
    • Many Books Available
    • 3 pages of JSF jobs on Monster (Author’s Note: Compare this to the dozens of pages of Struts jobs on Monster)

Webwork

  • Core Values
    • Simplicity
    • Testability (管这两条就值得,如今TDD也流行,没办法,他们总希望程序员能搞定一切!) 
    • Maintainability
    • Extensibility
  • View Technology agnostic, supporting JSP, Velocity, and other view technologies (这和Spring有的一拼)
  • Maps HTTP request to a logical (interceptable) action (所以也可以不仅仅针对HTTP了,Command而已嘛)
  • Simple components via the hierarchical MVC and template mechanisms

Shale

  • A framework built on JSF technology and Jakarta  (更上一层楼了,JSF虽好,但我吸取了Struts和Jarkarta项目的多年功力,你也没办法)
  • A proposal for Struts 2.0 (TSS Editor’s Note: Last we checked, there is quite a bit of uncertainty as to whether Shale will actually become Struts 2.0.) (Shale原本计划成为Struts2德,可是....,她和JSF而且两者都是同一个人打造的了)
  • A Struts sub-project (还在孵化培育中,所以..........看上去很美)
  • No direct connection with Struts Classic (ie Struts 1.x)  (和Struts不是一回事哦)
  • Described as JSF++:  “JSF 1.0 didn’t include everything we wanted to add due to time.  So Shale attempts to add it.  Features like client-side validation, AJAX, etc… are slated for JSF 2.0.  Meanwhile, Shale is a proving ground for those ideas.” (JSF++有意思,那么下一版本的JSF又该如何?
  • Shale Features:
    • Web Flow
    • Ajax
    • Spring and Tiles Integration (Tiles应该很快会独立了)
    • Client and Server-side Validation  (使用Commons Validator?)
    • Tapestry-like views and parameterized Subtree   (互相学习阿)
    • Utilities: Back-Button abuse, (令人头痛的同步问题)file-uploads, JNDI API
  • Shale’s Extension Points
    • ShalePropertyResolver
    • ShaleVariableResolver
    • DialogNavigationHandler
    • ShaleViewHandler
    • TilesViewHandler
  • “If you know nothing about JSF itself, JSF is very, very extensible.” 

Tapestry

  • Core Values:
    • Simplicity - web applications shouldn't be rocket science!
    • Consistency - what works in pages should work in components. What works in small applications should work in large applications. Different developers should find similar solutions to similar problems. (组件,又是组件。有人问,什么是组件??我也不知道,但是在软件开发中,组件无处不在!呵呵)
    • Efficiency - applications should be performant and scalable
    • Feedback - when things go wrong, the framework should not get in the way; in fact, it should provide useful diagnostics
  • Tools:
    • Does not require the use of tools
    • Let you use the design tools you already know.
  • New Features in Tapestry 4.0 (subset):
    • Annotations Support (也是很Fancy的东西)
    • Really excellent integration
    • Much more flexibility in terms of how you manage serverside state.  Very efficient about what it stores in the session, if anything at all.
    • Portlets Support
  • Extensibility:
    • Over 180 extension points (老大,是不是多了点
    • Built around Component Object Model with many layers
    • Terrific ability to override, change, and customize
    • Great support for component libraries which are open source and available. (这个库由你一家操办,力量小了吧)
  • "Tapestry is a predecessor, almost a research project, for some of the other frameworks"

Wicket

  • Wicket is the new kid on the block.
  • "Wicket is Easy, Wicket is Elegant", Wicket is Powerful." (怎么听都象“今年我家不收礼............”)
  • Easy to Use:
    • Simple, Consistent, Obvious
    • Reusable Component (都想这样)
    • Non-Intrusive (这点很重要,集成嘛。。。)
    • Safe
    • Efficient/Scalable

Noteworthy Quotes:

Editors Note: The Q&A rounds were a bit like a peanut gallery where it was often difficult to tell which contender said which cheap-shot.  Furthermore, there was as much smack talk as there was bonafide technical commentary.  Short of who said what, what was most telling during this round was the overall interplay.  In an effort to capture this interplay without making our contenders feel their comments were misattributed, we’ve included a collection of quotes overheard during the round without necessarily attributing them to their origin.

  • "Everybody is knows that JSF is much better than Struts.  Meanwhile JSF is Neck and Neck with Tapestry"
  • "Struts is old school, so get over it."   (培养了很多人,也培养了很多框架哦,而且用户数量也还在急剧增长,基数也大)
  • "If you need a tool like that, your framework is probably too complex."
  • "You can talk about tools, but you can't make people use them."
  • "If you want to save your Struts code-base, then JSF is the way to go." (的确二者集成比较容易)
  • “It's the fact you can extend your framework in a standard way and create an artifact that can extend this piece of functionality.  You can't really do that in Struts or Webwork.”  To which someone replied that you don’t need a fancy event model to obtain reuse in a web app.(扩展性,)

Our Scorecard

TSS did its best to keep score during the shoot-out.  We decided to score each of the frameworks in a 5-point scale in two separate categories:

  • Technical Features
  • Business Case

Technical Features

Framework

Score

Rational

JavaServer Faces (JSF)

4.8

JSF win’s major points for it’s 1 st class support for true web components.  Our analyst felt allegations of JSFs lack of simplicity and elegance to be unmerited.  JSF is simple to use, powerful, and revolutionary.  And the existence of Shale and Spring -JSF are a testament to the true extensibility of Faces.
(大腕们的支持,当然不同了。就如同少林武当的功夫)

Webwork

4.2

Webwork’s hierarchical MVC model was revolutionary in it’s time and served as a fore-runner to many of the web-component models we are now witnessing.  However, we feel Webwork’s HMVC and template facilities are eclipsed by JSFs refinement of these ideas into JSFs truly 1 st class component model.

Shale

4.95

If Shale stands taller than the other frameworks, it’s because it stands on the shoulders of giants.  (一个蓝图)By extending JSF to include advanced web-flow, AJAX support, tiles integration, and client-side validation, our judge felt that Shale represents the future of where web-frameworks need to move technically.

Tapestry

4.75

Tapestry pioneered the idea of a web-component and set the bar.  The claim during the debate that “Tapestry and JSF are neck-and-neck” isn’t too far off.  However, JSF’s standardized extension points and first-class support for portlet development is a truly compelling technical case against which Tapestry can’t yet compete.  We’ll be watching this race closely.  We’d love to see Tapestry support some of the JSF standard interfaces to support interoperability… specifically we’d love to be able to write JSF components using Tapestry and to use Tapestry components as JSF components.  We’ll be eagerly watching what Howard includes in the next release.

Wicket

Not-Rated

Wicket is the new kid on the block, only having reached 1.0 a few weeks prior to JavaONE.  Our judge didn’t feel it was fair to score Wicket without knowing a little more about it.  However, if Wicket is truly as simple as it claims to be we’ll certainly be keeping our eye on it.  We’d also like to extend to Wicket the same interoperability challenge we just extended to Tapestry.

Struts

4.2

While Struts wasn’t formally included in the shootout, as the incumbent Struts is the framework by which all other web frameworks are judged.  When Struts was released it revolutionized the web world with it’s inclusion of data-bound controls, action event handlers, and externalized navigation.  Since then, Struts has expanded to include tiles, the Struts validator, and extensibility through dynabeans.  However, Struts has also been a victim of its own success, lacking a formal component model chiefly due to the necessity for backwards compatibility trump ing its ability continue to pioneer new ground.  This is why Craig McClanahan, the original creator of Struts, started Shale, in hopes that Shale may one day become the new defacto standard. (*Sorry, .tag files don’t count as web components, since they’re output-only reuse.)

 

Business Case

Framework

Score

Rational

JavaServer Faces (JSF)

3.9

JSF is now an official Java Standard and will be an integral part of J2EE 5.0.  With endorsements from Sun, IBM, BEA, Oracle, and dozens of other companies, JSF shows a lot of promise.  However, we cannot ignore the limited numbers of deployments currently using JSF.  If JSF wants to win the heart of IT managers away from Struts, it’s going to need a plethora of success stories behind its belt.  Simply naming a few big names, such as FedEx, who have used JSF on a few select projects just doesn’t cut it here.  As strong as JSF is, we’ll be waiting to see those success stories come pouring in before we bet the business on it.  Yet, in comparison to the other frameworks presented at the shootout (remember, Struts was absent) JSF still came in first place with a score of 3.9.

Webwork

3.1

When our judge stood up during the audience questions round and asked each framework for an order-of-magnitude estimate of the number of projects currently deployed using it’s framework, all the frameworks, including JSF hemmed and hawed and dodged the question.  But we simply LOVED Webwork’s answer “ Do I get to count each of Google’s server’s as its own deployment”… if GOOGLE is willing to bet the business on Webwork, that lends a huge vote of confidence.

Shale

1.3

While Shale builds on top of JSF and is in many ways technically superior, it is still unproven.  From a business risk management standpoint, it’s just too new and its is future too uncertain.  Sure, the claim to fame that Shale is a proposal for Struts 2.0 sounds impressive, but that’s just it, it is just one proposal far from being adopted.  Quite frankly there are a large number of barriers which must be overcome before it’s accepted by the Struts community at large.

Tapestry

2.8

Like Webwork, Tapestry is a framework that has been around the block quite a few times and is a robust, proven framework.  (It’s used to power TheServerside.com.)  Tapestry 4.0 offers a whole new set of exciting features.  Yet we feel Tapestry creator Howard Lewis Ship said it best when he described Tapestry as a “research project” for the other web frameworks.  For small elite development teams who want all the latest innovations, Tapestry is great.  For large IT shops looking for wide industry adoption, a large community of experienced developers to choose from, and hundreds of successful deployments to point to, we just don’t feel Tapestry fits the bill (yet).  Our challenge to make Tapestry play nice with JSF still stands… standards compatibility may be just what Tapestry needs to ease the minds of risk-averse IT managers.

Wicket

0.7

As strong as the case for Wicket’s simplicity may be, there are still less than 5 projects using Wicket, all of which belong to Wicket’s author s.  As the new kid on the block, Wicket’s innovations are warmly welcomed.  However Wicket still has a long way to go to prove itself.

Struts

4.6

With literally thousands of deployed projects using Struts, Struts has been adopted as the framework of choice by IT organizations large and small and won’t be leaving anytime soon.  Struts stuffers slightly from not being an official standard, but it’s status as a “defacto-standard” is nearly as good.  Almost every major vendor now includes Struts support in their products.  A risk-averse IT manager can’t go wrong adopting Struts.

posted on 2005-07-05 09:31 铁手 阅读(2163) 评论(0)  编辑  收藏 所属分类: Java


只有注册用户登录后才能发表评论。


网站导航: