各种Java Web框架的优缺点是什么? [英] What are the pros and cons of the assorted Java web frameworks?

查看:194
本文介绍了各种Java Web框架的优缺点是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在考虑使用Java创建自己的网站,并试图决定使用哪个框架。但是,快速搜索Java框架可以选择50多个!



我的网站只是为了我自己开始构建它的乐趣,但如果它变得流行,那么它具有一定的可扩展性,或者至少能够重新设计它是有好处的。



它们之间的主要区别是什么?更受欢迎的框架?有没有一个显着优于其他人的情况?例如,高流量企业应用程序与低流量小型应用程序。我也想知道有些人比其他人更容易学习和使用。



是否有人对某些框架有经验并可以提出建议?选择的绝对数量是否可以作为早期警告以尽可能避免基于Java的Web开发?

解决方案

我是使用 Tapestry 3 Wicket Echo ,以及 JSF 相当广泛。我真的建议你看看那些,并选择一个对你来说最简单的,并且最接近你喜欢的工作方式。



其中,对我来说最舒服的是 Wicket ,因为组件构建的轻量级特性和页面模板的简单性。如果您使用自己的db代码而不是Hibernate或其他框架(我对Wicket Hibernate或Spring Integration完全不满意),那就更加重要了。



Echo 非常棒,如果你不介意用Java编写所有的布局。我知道现在情况有所不同,但我仍然认为该产品服务范围相当狭窄。他们似乎也改变了每个主要版本的开发模型。



Tapestry 是一个很棒的产品,但在开发模式方面显然与其他产品有很大的不同,因为它主要由一个人主导。 Howard Lewis Ship无疑很聪明,但我对他们决定基本忘记每个版本的向后兼容性感到失望。但是,根据您的需要,这可能无关紧要,而且我总是发现Tapestry产品令人愉快。



JSF 已经存在多年了,仍然感觉像 Struts 用于修复Struts的所有问题。没有真正理解Struts的所有问题。它仍然有一种未完成的感觉,虽然该产品显然非常灵活。我使用它并对它有一些喜爱,对它的未来寄予厚望。我认为在JEE6中提供的下一个版本(2.0)将真正将它带入自己的版本,使用新的模板语法(类似于Facelets)和简化的组件模型(最终只有1个文件中的自定义组件)。 / p>

当然,还有一百万个较小的框架和工具可以自己跟随( Velocity 满足基本需求,原始 JSP ,Struts等) 。不过,我通常更喜欢面向组件的框架。



最后,我建议您只看看Tapestry,Wicket和JSF,然后选择一款最适合您的产品。您可能会找到一个符合您喜欢的工作方式的工具。


I am considering creating my own website using Java and am trying to decide what framework to use. However, doing a quick search for Java frameworks returns more than 50 to choose from!

My website is just going to be for my own enjoyment of building it in the beginning, but if it becomes popular, it would be good for it to have some scalability, or to at least be able to redesign for that.

What are the main differences between the more popular frameworks? Are there instances where one significantly outperforms the others? For example, high-traffic enterprise applications versus low-traffic small applications. I'm also wondering if some are much easier to learn and use than others.

Is there anyone who has experience with some of these frameworks and can make a recommendation? Does the sheer number of choices just serve as an early warning to avoid Java-based web development where possible?

解决方案

I've used Tapestry 3, Wicket, Echo, and JSF fairly extensively. I'd really recommend you look those over and pick the one that appears the easiest for you, and to most closely fit the way you prefer to work.

Of them, the most comfortable for me to work with was Wicket, due to the lightweight nature of component building and simplicity of page templating. That goes doubly so if you are using your own db code instead of Hibernate or some other framework (I was never completely happy with Wicket Hibernate or Spring Integration).

Echo is great if you don't mind writing all of your layout in Java. I know that is different now, but I still think that product serves a fairly narrow niche. They change the development model with every major release as well it seems.

Tapestry is a great product, but it is obviously very different from the others in terms of development model as it is led mainly by one dude. Howard Lewis Ship is no doubt quite smart, but I am disappointed with their decision to basically forget backwards compatibility with each release. Again, though, for your needs this may not matter, and I've always found the Tapestry products pleasurable to work against.

JSF has been out for years, and still feels like something that a Struts guy built to fix all of the problems of Struts. Without really understanding all of the problems with Struts. It still has an unfinished feel to it, although the product is obviously very flexible. I use it and have some fondness for it, with great hopes for its future. I think the next release (2.0) to be delivered in JEE6 will really bring it into its own, with a new template syntax (similar to Facelets) and a simplified component model (custom components in only 1 file... finally).

And, of course, there are a million smaller frameworks and tools that get their own following (Velocity for basic needs, raw JSPs, Struts, etc). I generally prefer component oriented frameworks myself, though.

In the end, I'd recommend just taking a look at Tapestry, Wicket, and JSF and just picking the one that feels the best to you. You'll probably find one that just fits the way you like to work very quickly.

这篇关于各种Java Web框架的优缺点是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆