哪个java web框架要学习? [英] Which java web framework to learn?

查看:106
本文介绍了哪个java web框架要学习?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对学习java web开发框架感兴趣,我正在寻找一些我应该学习的建议/建议(以及为什么)。

I'm interested in a learning a java web development framework and I'm looking for some recommendations/suggestions on which one I should learn (and why).

理想情况下,我希望框架能够:

Ideally, I'd like the framework to:



  1. 基于MVC。

  2. 最小化(如果有的话)

  3. 有一个易于使用的ORM

  4. 有不错的会话管理

  5. 轻松取件

  1. Be MVC based.
  2. Have minimal if any configuration
  3. Have an easy to use ORM
  4. Have decent session management
  5. Be easy to pickup


我熟悉pylons和django所以如果有的话java框架类似于其中任何一个,那么我对它特别感兴趣。

I'm familiar with pylons and django so if there's a java framework similar to either one of those then I'd be especially interested in it.

谢谢。

结论:

首先,我要感谢那些花时间分享他们见解的人。在过去的几周里,我尝试了Spring MVC,Wicket和Stripes。最终,我选择Stripes的原因是Civil Disededient描述的所有原因;令人惊讶的是,他的一个陈述并不是双曲线。结合Stripes,我正在使用JPA / Hibernate。与Struts2,JSF等相比,我所关注的一个问题是Stripes社区似乎相对小。虽然它可能相对较小,但社区非常容易接触,友好且乐于助人。

First and foremost, I'd like to thank those that took the time to share their insights. Over the past few weeks, I tried out Spring MVC, Wicket, and Stripes. Ultimately, I chose Stripes for all the reasons "Civil Disobedient" described; surprisingly not one of his statements turned out to be hyperbolic. In conjunction with Stripes, I'm using JPA/Hibernate. One concern I had was the Stripes community seemed relatively "small" when compared to Struts2, JSF, etc. While it maybe comparatively small, the community is very accessible, friendly and helpful.

最后,虽然我没有尝试过Grails,但我确实对它进行了调查,看起来很有趣/很有希望。从我看到的,Groovy语法看起来非常类似于python(因为我熟悉w / python,这将使我更容易学习)和Grails框架本身似乎是一个可与Rails,Django相媲美的RAD框架/挂架。我当然打算进一步研究和(在不久的将来)最终学习groovy / grails。

Lastly, while I did not try out Grails, I did look into it and it looks very interesting/promising. From what I've seen, Groovy syntax looks very similar to python (since I'm familiar w/ python, that would make it easier for me to learn) and the Grails framework itself seems to be a RAD framework comparable to Rails, Django/Pylons. I certainly plan to look further into and (in the near future) eventually learn groovy/grails.

推荐答案

Stripes 毫无疑问,我有幸使用过的最好,最简单的java框架。要解决您的每一项要求:

Stripes is without a doubt the best and easiest java framework I've ever had the pleasure of using. To address each of your reqs:


基于MVC。

Be MVC based.

MVC在旁观者眼中是至关重要的 - 至少,这在很大程度上取决于你如何设计你的代码结构。但是,使用Stripes的MVC项目结构非常简单。

MVC is sort-of in the eye of the beholder--at least, this depends heavily on how you design your code structure. But yes, it's quite simple to use an MVC project structure with Stripes.


如果有任何配置,则最小化

Have minimal if any configuration

这是Stripes闪耀的地方。要启动并运行,只需在web.xml中添加几行即可。其他一切都是自动连线的。 Stripes的美妙之处在于如果你愿意的话,一切都可以很容易被覆盖。

This is where Stripes shines. To get up and running you need only to put a few lines in your web.xml. Everything else is automagically wired-up. The beauty of Stripes is that everything can be easily overridden if you so desire.


有一个易于使用的ORM

Have an easy to use ORM

Stripernate 是框架的流行扩展,同样可以自动运行。

Stripernate is a popular extension to the framework that, again, works automagically.


有不错的会话管理

Have decent session management

就像 @ Session 注释。或者,如果需要,您可以在会话中保留整个ActionBean。 Stripes内置支持向导,因此您无需担心你自己在请求之间保留状态。

As simple as a @Session annotation on the field. Or you can persist the entire ActionBean in the session if you want. Stripes has built-in support for Wizards, so you don't have to concern yourself about preserving state across requests.


易于取件

Be easy to pickup

这是Stripes最强的套装。更不用说, Wiki 的记录非常好。

This is Stripes' strongest suit. Not to mention, the Wiki is incredibly well-documented.

此外,Stripes内置支持布局模板本地化 AJAX ,以及其他一些东西。与一些需要数十个巨大的JAR(咳嗽...... Tapestry )的框架不同,整个框架是一个重量不到500 KB的JAR。

In addition, Stripes has built-in support for layout templates, localization, AJAX, and a bunch of other stuff. And unlike some frameworks that require dozens of gigantic JARs (cough... Tapestry), the entire framework is a single JAR that weighs in at less than 500 KB.

这篇关于哪个java web框架要学习?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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