热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

shaleframework

JavaOneDay4的内容之一是Web框架之间的交锋,Struts的下一代Shale出人意料的拔得头筹,下面是具体的情况:遗憾的是Sp
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.

  Shale同Struts一样,系出名门--
Apache。 但Shale是一种完全不同于Struts的框架,她是经过精心设计的Struts的后代,包含Java Web程序设计中一些最重要的、最近的开发成果,包括JSP Standard Tag Library(JSTL)和JavaServer Faces(JSF),并建立在这些开发成果之上。



同Struts相比,Shale有两点最为突出:


  • Struts 与 JSF 集成,而 Shale 则是建立在 JSF 之上。

  • Struts 实质上是一个巨大的、复杂的请求处理器;而 Shale 则是一组可以以任何方式进行组合的服务。


Shale的特性:


  • View Controller(视 图控制器) - Convenient mechanism to associate a “backing” Java class with each JavaServer Faces view in an application, with predefined event handers for events significant to an application developer.

  • Dialog Manager (会 话管理器)- Mechanism to define a “conversation” with a user that requires multiple HTTP requests to implement, modeled as a state diagram.

  • Application Manager(应用管理器) - Traditional application wide front controller features that should be applied to every request.

  • Validation(验证) - Integration with the Jakarta Commons Validator Framework, supporting both client side and server side validations based on a single set of configured validation rules.

  • Remoting(远程访问) - Server side support for applications that employ AJAX (Asynchronous Javascript and XML) style interactions.

  • Spring Integration(集成Spring) - Integration with the Spring Framework, allowing the use of Spring’s dependency injection framework to create JavaServer Faces managed beans.

  • Clay - An alternative to JSP where you define views in pure HTML, in a fashion similar to Tapestry and Facelets. An innovative sub-framework for supporting the configuration of reusable subtrees of JavaServer Faces components for customizable reuse.

  • Test Framework(测试框架) - Set of mock objects and JUnit test case base classes suitable for testing both the framework classes themselves, as well as application components built on top of the framework.

  • Tiger Extensions(Tiger 扩展) - Optional add-on library that adds additional ease-of-use features for Shale applications that run on Java Standard Edition 5 (popularly known by its code name during development, “tiger”).


安装Shale先决条件:


  • Java Runtime Environment(JRE)和 Java Development Kit(JDK) 1.4 或更高版本

  • Java Servlet API 2.4 或更高版本

  • JSP 2.0 或更高版本

  • JSF 1.1 或更高版本

  • JSP Standard Tag Library(JSTL)1.1 或更高版本

  • Jakarta Commons BeanUtils 1.7 或更高版本

  • Jakarta Commons Chain 1.0 或更高版本

  • Jakarta Commons Digester 1.7 或更高版本

  • Apache Logging 1.0.4 或更高版本

  • Apache Ant 1.6.3 或更高版本,只是在构建 Shale 时要用到


如果想跟踪Shale中的bug,那么需要FindBugs 0.8.5 或更高版本和JUnit 3.8.1 或更高版本。



Shale的附件和它们的依赖项:


  • Jakarta Commons Validator 1.2 或更高版本

  • Spring Framework 1.2.2 或更高版本

  • Struts Tiles Framework(独立版本)

  • Cargo

  • jMock


如果希望只在Shale上工作,将需要以下附加资源:


  • JDK1.4或以上(Shale Tiger用到的JDK版本为1.5或以上).
  • Apache Maven 2.0.4或以上.


Shale项目主页:
http://shale.apache.org



目前的版本:
Shale 1.0.2 (Alpha)



她是否就是我们所正在期待的呢?还是让时间来证明吧。





Tags -
shale ,
apache ,
framework
推荐阅读
  • VScode格式化文档换行或不换行的设置方法
    本文介绍了在VScode中设置格式化文档换行或不换行的方法,包括使用插件和修改settings.json文件的内容。详细步骤为:找到settings.json文件,将其中的代码替换为指定的代码。 ... [详细]
  • 本文介绍了RPC框架Thrift的安装环境变量配置与第一个实例,讲解了RPC的概念以及如何解决跨语言、c++客户端、web服务端、远程调用等需求。Thrift开发方便上手快,性能和稳定性也不错,适合初学者学习和使用。 ... [详细]
  • 先看官方文档TheJavaTutorialshavebeenwrittenforJDK8.Examplesandpracticesdescribedinthispagedontta ... [详细]
  • Forexperiencedcryptoinvestors,thereareseveralsectorsthatseemedpromisingbutdidn’tlive ... [详细]
  • rust编程这篇文章是关于我通过解决Twitch上尚未解决的所有CtCI问题来学习Rust的经验。英国科学博物馆集团AdaLovelace的肖像Rust徽标,由Moz ... [详细]
  • 生成式对抗网络模型综述摘要生成式对抗网络模型(GAN)是基于深度学习的一种强大的生成模型,可以应用于计算机视觉、自然语言处理、半监督学习等重要领域。生成式对抗网络 ... [详细]
  • 如何使用Java获取服务器硬件信息和磁盘负载率
    本文介绍了使用Java编程语言获取服务器硬件信息和磁盘负载率的方法。首先在远程服务器上搭建一个支持服务端语言的HTTP服务,并获取服务器的磁盘信息,并将结果输出。然后在本地使用JS编写一个AJAX脚本,远程请求服务端的程序,得到结果并展示给用户。其中还介绍了如何提取硬盘序列号的方法。 ... [详细]
  • sklearn数据集库中的常用数据集类型介绍
    本文介绍了sklearn数据集库中常用的数据集类型,包括玩具数据集和样本生成器。其中详细介绍了波士顿房价数据集,包含了波士顿506处房屋的13种不同特征以及房屋价格,适用于回归任务。 ... [详细]
  • [大整数乘法] java代码实现
    本文介绍了使用java代码实现大整数乘法的过程,同时也涉及到大整数加法和大整数减法的计算方法。通过分治算法来提高计算效率,并对算法的时间复杂度进行了研究。详细代码实现请参考文章链接。 ... [详细]
  • Python爬虫中使用正则表达式的方法和注意事项
    本文介绍了在Python爬虫中使用正则表达式的方法和注意事项。首先解释了爬虫的四个主要步骤,并强调了正则表达式在数据处理中的重要性。然后详细介绍了正则表达式的概念和用法,包括检索、替换和过滤文本的功能。同时提到了re模块是Python内置的用于处理正则表达式的模块,并给出了使用正则表达式时需要注意的特殊字符转义和原始字符串的用法。通过本文的学习,读者可以掌握在Python爬虫中使用正则表达式的技巧和方法。 ... [详细]
  • IOS开发之短信发送与拨打电话的方法详解
    本文详细介绍了在IOS开发中实现短信发送和拨打电话的两种方式,一种是使用系统底层发送,虽然无法自定义短信内容和返回原应用,但是简单方便;另一种是使用第三方框架发送,需要导入MessageUI头文件,并遵守MFMessageComposeViewControllerDelegate协议,可以实现自定义短信内容和返回原应用的功能。 ... [详细]
  • 本文介绍了在MFC下利用C++和MFC的特性动态创建窗口的方法,包括继承现有的MFC类并加以改造、插入工具栏和状态栏对象的声明等。同时还提到了窗口销毁的处理方法。本文详细介绍了实现方法并给出了相关注意事项。 ... [详细]
  • 近来有一个需求,是需要在androidjava基础库中插入一些log信息,完成这个工作需要的前置条件有编译好的android源码具体android源码如何编译,这 ... [详细]
  • php和jq开发怎么使用es6,PHP与jquery
    本文目录一览:1、phpstorm怎么使用es6语法 ... [详细]
  • 记一次线上环境的内存溢出(java.lang.OutOfMemoryError)
    事故背景今天客户说风控项目有个别用户查询不到数据不是报错就是一直卡在那里,我就去那个接口看了下。一看项目日志今天的都几个g了,平常也就几百兆吧ÿ ... [详细]
author-avatar
手机用户2502929415
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有