问题描述
我已经回顾了一些关于SO的Struts 1 vs 2问题,但似乎没有人在我看到它的角度回答这个问题。
I have reviewed a few Struts 1 vs 2 questions on SO but none seem to answer the question in the perspective that I am looking at it with.
我是即将开始构建新系统的工作,对一个非常古老的桌面应用程序进行全面的重新设计。目标是使其基于Web,添加更多功能,使其更具可用性(通常的再造原因)。
I am about to start work architecting a new system, a complete re-engineering of a very old desktop application. The goal is to make it web based, add more functionality, make it more usable etc (the usual reengineering reasons).
将开发系统的团队主要是Java开发人员在过去5年中广泛使用Struts 1.x。
The team who will be developing the system are mainly Java developers and have worked on Struts 1.x extensively over the past 5 years.
该系统将在未来许多年内存在,因此在更好的框架出现的3 - 5年内再次重新设计的想法不是选项。它并不打算大量使用AJAX。
The system is intended to live for many years to come, so the idea of re-engineering again in 3-5 years time when a better framework comes out is not an option. It is not intended to heavily use AJAX.
我的问题是,当我的团队对Struts 1.x有如此丰富的经验时,为什么我会费心去Struts 2。我知道有一些改进,但我担心让团队加快速度,因错误使用等而导致返工的时间将远远超过我们从Struts 2获得的任何好处。我们喜欢Struts 1,它做的就是我们需要它,并且所有的设计模式,标准,最佳实践等都已到位。
My question, is why would I bother moving to Struts 2 when my team are so experienced with Struts 1.x. I understand that there are some improvements, but I worry that the time lost in getting the team up to speed, rework due to incorrect usage etc will far outweigh any benefit we would get from Struts 2. We like Struts 1, it does what we need to it do, and all the design patterns, standards, best practices etc are in place.
Struts 2是否有任何杀手级功能或Struts 1中我不知道的严重问题会影响继续使用Struts 1。
Are there any killer features with Struts 2 or serious problems I don't know about in Struts 1 that would sway the decision to stay with Struts 1.
推荐答案
如果从头开始构建系统,我肯定会转向Struts的2.x版本。对于Struts 1.x团队来说,学习曲线不会很好,但是你可以利用最新的MVC框架。
If you are building a system from scratch I would definitely move onto version 2.x of Struts. The learning curve will not be great for a Struts 1.x team, but you will be able to take advantage of an up-to-date MVC framework.
对我来说Struts 2.x的两个主要功能是提高工作效率:
For me the two main features of Struts 2.x which will enhance productivity are:
- 内置AJAX支持
- 没有更多的ActionForms - 如果你愿意,你可以直接绑定到域对象,所以这个中间步骤已经消失。
如果它是一个你正在研究的大项目,你可能想看一个组件框架,例如JSF 2或Wicket。如果您决定继续使用基于Action的框架,那么我个人会发现Stripes是一个更高效的框架。
If it's a big project you're working on, you might want to look at a component framework e.g. JSF 2 or Wicket. If you're determined to stay on an Action based framework then I personally find Stripes a more productive framework.
这篇关于Struts 1.x vs Struts 2.x.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!