各种 Java Web 表示层技术的优缺点
我目前正在开发一个大量使用 JSF 和 IceFaces 的 Web 应用程序。 我们已经就转移到另一个表示层进行了一些讨论,我想我应该将讨论放到 SO 中,看看专家们的想法。
我很好奇是否有人可以权衡各种 Java 表示层技术的优缺点。 如果您只使用过一种产品,请说出您喜欢或讨厌它的原因。 如果您曾与几个人合作过,请留下您对他们如何相互比较的印象。
我们正在考虑的技术有:
- IceFaces
- JSF(不带 IceFaces)
- GWT(Google Web Toolkit)
- Wicket
- Tapestry
如果我遗漏了列表中的任何内容,请告诉我。
谢谢!
I'm currently working on a web app that makes heavy use of JSF and IceFaces. We've had some discussions of moving to another presentation layer, and I thought I'd take the discussion out into SO and see what the experts think.
I'm curious if anyone could weigh in on the pros and cons of the various Java presentation layer technologies. If you've only worked with one, say why you love it or hate it. If you've worked with several, give your impressions of how they stack up against each other.
Our technologies under consideration are:
- IceFaces
- JSF (without IceFaces)
- GWT (Google Web Toolkit)
- Wicket
- Tapestry
And if I'm missing anything from my list, let me know.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
我的观点非常偏向 Wicket,因为在多次被 JSP 地雷绊倒之后,我已经使用它一段时间了。
Wicket PRO:
Wicket 缺点:
Form.onSubmit( )
) 需要广泛的子类化或匿名方法重写才能轻松注入行为。 这部分是由于 Wicket 强大的基于事件的设计,但不幸的是,这也意味着很容易使 Wicket 的代码变得混乱。随机缺点:(也就是说,我没有使用过,但这些是我的意见和/或我听说过的事情)
My opinions are quite heavily biased towards Wicket because I've been using it for a while after tripping over JSP mines far too many times.
Wicket PROs:
Wicket CONs:
Form.onSubmit()
) require extensive subclassing or anonymous method overriding for injecting behaviour easily. This is partly due to Wicket's powerful event-based design but unfortunately it also means it's easy to make a code mess with Wicket.Random CONs: (that is, I haven't used but these are my opionions and/or things I've heard)
我已经将 GWT 用于几个小项目。 以下是我喜欢它的一些特点:
我不喜欢的事情:
I've used GWT for a couple small projects. Here are some things I like about it:
Things I don't like:
我要问的最大问题是为什么要更改表示层? 这是一个非常昂贵的成本,我可以看到一种技术的好处超过其他技术,其好处与改变的成本一样多......
The biggest question I'd ask is why are you changing presentation layer? That's a very expensive cost and I can see the benefits of one technology outweighing the others by as much as the cost to change...
简而言之:
= JSF =
PROS:
缺点:
= WICKET =
优点:
缺点:
In short:
= JSF =
PROS:
CONS:
= WICKET =
PROS:
CONS:
条纹怎么样?
What about Stripes?
我的选择是Wicket。 已经使用过它并且具有出色的可重用性。 它拥有最活跃的论坛/邮件列表之一。 作为一个问题,几分钟内就会得到答案。 它对 AJAX 有很好的支持。 Wicket 的常见缺点之一是学习曲线陡峭。 好吧,这些是老年的缺点之一,现在已经没有价值了。
JSF:最好远离它。 另一个在 JSF 上开发项目的团队在取得成功后现在正在考虑转向 Wicket。
@Megadix:就像你说的,文档一开始很差,但现在不再这样了。 有一本由 Wicket 开发者编写的优秀书籍,名为《Wicket in Action》。 网站上提供的示例代码也是一个开始和学习的好地方
My pick would be Wicket. Have used it and is gives excellent re-usability. It has one of the most vibrant forum/mailing list. As a question and its gonna be answered in minutes. It has excellent support for AJAX. One of the usual cons attributed to Wicket is the steep learning curve. Well those were one of the old age cons which hold no value anymore now.
JSF: Better stay away from it. Another team which developed a project on JSF is now thinking to shift to Wicket after our success with it.
@Megadix: Like you said the documentation was poor in the beginning, but not any more. There is an excellent book called Wicket in Action written by the developers of Wicket. The sample code provided on the site is also a good place to start and learn
我想知道您是否有一个与 Web 客户端不同的服务层,Web 控制器只需调用该服务层即可完成其工作。
如果这样做,Web UI 技术的选择就可以与后端解耦。 如果它作为合同优先 Web 服务公开,您可以让不同的应用程序共享它。 只要您的客户端可以发送和接收 XML,他们就可以与您的服务进行交互。 想要切换到 Flex? 不用担心 - 将其指向服务并呈现 XML 响应。
I'd wonder if you a have a service layer that's distinct from the web client, something that the web controllers simply invoke to get their work done.
If you do, the choice of web UI technology can be decoupled from the back end. If it's exposed as a contract first web service, you can have different apps share it. As long as your clients can send and receive XML they can interact with your services. Want to switch to Flex? No worries - point it at the service and render the XML response.
请参阅我对 Wicket 和 Tapestry 5 的比较: Apache Tapestry 和阿帕奇检票口。
See my comparison of Wicket and Tapestry 5: Difference between Apache Tapestry and Apache Wicket.