有人可以推荐一个简单的Java Web应用程序框架吗? [英] Can anyone recommend a simple Java web-app framework?

查看:88
本文介绍了有人可以推荐一个简单的Java Web应用程序框架吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试开始我希望在Java中使用相对较快的Web应用程序,但我尝试过的大多数框架(Apache Wicket,Liftweb)需要这么多的设置,配置,并且试图用我的头围绕Maven,同时让整个事情与Eclipse玩得很好,我花了整个周末试图达到我写第一行代码的地步!

I'm trying to get started on what I'm hoping will be a relatively quick web application in Java, yet most of the frameworks I've tried (Apache Wicket, Liftweb) require so much set-up, configuration, and trying to wrap my head around Maven while getting the whole thing to play nice with Eclipse, that I spent the whole weekend just trying to get to the point where I write my first line of code!

任何人都可以推荐一个简单的Java webapp框架,它不涉及Maven,可怕的复杂目录结构,或者必须手动编辑的无数XML文件吗?

Can anyone recommend a simple Java webapp framework that doesn't involve Maven, hideously complicated directory structures, or countless XML files that must be manually edited?

推荐答案

我自己没试过,但我认为

Haven't tried it myself, but I think

http://www.playframework.org/

有很大的潜力......

has a lot of potential...

来自php和经典的asp,它是第一个听起来很有希望的java网页框架....

coming from php and classic asp, it's the first java web framework that sounds promising to me....

按原始编辑nal question asker - 2011-06-09

只是想提供更新。

我和Play一起去了,这正是我要求的。它只需要很少的配置,只需开箱即用。它不同寻常之处在于它避开了一些常见的Java最佳实践,以便尽可能保持简单。

I went with Play and it was exactly what I asked for. It requires very little configuration, and just works out of the box. It is unusual in that it eschews some common Java best-practices in favor of keeping things as simple as possible.

特别是,它大量使用静态方法,甚至对传递给方法的变量名称进行一些自省,这是Java反射API不支持的。

In particular, it makes heavy use of static methods, and even does some introspection on the names of variables passed to methods, something not supported by the Java reflection API.

Play的态度是它的第一个目标是成为一个有用的Web框架,并坚持常见的Java最佳实践和习惯用法是次要的。这种方法对我来说很有意义,但Java纯粹主义者可能不喜欢它,并且使用 Apache Wicket 会更好。 。

Play's attitude is that its first goal is being a useful web framework, and sticking to common Java best-practices and idioms is secondary to that. This approach makes sense to me, but Java purists may not like it, and would be better-off with Apache Wicket.

总之,如果你想构建一个方便和简单的网络应用程序,可以像Ruby on Rails这样的框架,但是在Java中并且有Java的好处工具(例如Eclipse),然后Play Framework是一个很好的选择。

In summary, if you want to build a web-app with convenience and simplicity comparable to a framework like Ruby on Rails, but in Java and with the benefit of Java's tooling (eg. Eclipse), then Play Framework is a great choice.

这篇关于有人可以推荐一个简单的Java Web应用程序框架吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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