12
返回列表 发新帖
楼主: Sky-Tiger

Building with WebWork2

[复制链接]
论坛徽章:
350
2006年度最佳版主
日期:2007-01-24 12:56:49NBA大富翁
日期:2008-04-21 22:57:29地主之星
日期:2008-11-17 19:37:352008年度最佳版主
日期:2009-03-26 09:33:53股神
日期:2009-04-01 10:05:56NBA季后赛大富翁
日期:2009-06-16 11:48:01NBA季后赛大富翁
日期:2009-06-16 11:48:01ITPUB年度最佳版主
日期:2011-04-08 18:37:09ITPUB年度最佳版主
日期:2011-12-28 15:24:18ITPUB年度最佳技术原创精华奖
日期:2012-03-13 17:12:05
11#
 楼主| 发表于 2008-11-6 22:59 | 只看该作者
Other Features not mentioned in detail


Action packaging
This allows you to jar up a set of Action classes and include the xwork.xml file as an include in the master xwork.xml file. You can also do the same for Velocity views, which, if used together will allow you to componentize your application for easier sharing of pieces of functionality.



UI Components and Custom components
Webwork allows you to create reusable, skinnable user interface components like a calendar date picker that so many weblogs seem to have these days.



Namespaces and Packages
You can bundle up configurations in xwork.xml into packages which can be used to extend other packages, gaining access to all actions, interceptors, etc. Add namespaces with the packaging and you can create action aliases with different classes giving you the ability to have RegisterAction.action in one namespace point to a different class in another namespace.

使用道具 举报

回复
论坛徽章:
350
2006年度最佳版主
日期:2007-01-24 12:56:49NBA大富翁
日期:2008-04-21 22:57:29地主之星
日期:2008-11-17 19:37:352008年度最佳版主
日期:2009-03-26 09:33:53股神
日期:2009-04-01 10:05:56NBA季后赛大富翁
日期:2009-06-16 11:48:01NBA季后赛大富翁
日期:2009-06-16 11:48:01ITPUB年度最佳版主
日期:2011-04-08 18:37:09ITPUB年度最佳版主
日期:2011-12-28 15:24:18ITPUB年度最佳技术原创精华奖
日期:2012-03-13 17:12:05
12#
 楼主| 发表于 2008-11-6 22:59 | 只看该作者
Why do I like WebWork2?
You may remember me ranting about how great Maverick is a few months back on TSS. So how does WebWork2 compare you ask? It's very similar. Both are built with a lot of interfaces to help promote extensibility and decoupling. Both are easy to use and have a well designed code base. But the big difference is that WebWork has Interceptors and IoC. You can handle much of the pre and post processing in Interceptors instead of in Action hierarchies like I did in the Wafer weblog application using Maverick when I was trying to do authentication. What about Struts? Struts does have much of the functionality that WW2 has BUT it is not part of the base release. For many that may not be a big deal but when it comes time for company standards those add-ons most likely won't be allowed. Also, Struts has full abstract classes and few interfaces.

WebWork is a Model-2 MVC framework. How many other frameworks fit that bill? Here is a possible list of reasons why you might be interested in using WW2:

It's built with interfaces instead of concrete classes
You like some of the features not included in the "other" framework like IoC or Interceptors.
You are looking for an MVC that is not bound to the J2EE environment, making unit testing easier along with other tasks.
Many companies are moving from Struts to Webwork as their standard.
You drink Pepsi instead of Coke.


Conclusion
Building the Wafer weblog application was truly a dream with WebWork. Their use of interfaces and interceptors make it easy and flexible and make it difficult to not day dream of all the ways I could work with these new concepts. The community is big and strong with leaders one can be proud of. In my Maverick article I mentioned that if you are going to learn one framework maybe you should choose Struts over Maverick. This time, I would say choose WebWork.

使用道具 举报

回复
论坛徽章:
131
乌索普
日期:2017-09-26 13:06:30马上加薪
日期:2014-11-22 01:34:242014年世界杯参赛球队: 尼日利亚
日期:2014-06-17 15:23:23马上有对象
日期:2014-05-11 19:35:172014年新春福章
日期:2014-04-04 16:16:58马上有对象
日期:2014-03-08 16:50:54马上加薪
日期:2014-02-19 11:55:14马上有对象
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14
13#
发表于 2008-11-7 00:44 | 只看该作者
垃圾 bs

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表