帮我选择Java Web框架

发布于 2024-09-09 09:06:53 字数 488 浏览 4 评论 0原文

我是 C++ WinForms 开发人员,然后转向 Java Swing。现在我需要做Web应用程序,但我有很强的GUI开发背景,所以我想将其投入使用。所以我一直在寻找一些不错的基于 Java 的框架,其中两个似乎就是我正在寻找的东西:

  • Apache Wicket
  • Google Web Toolkit

以下是我对框架的期望:

  • 纯 Java(没有 Scala、Groovy 或其他东西) !)
  • 更多的Java编码,更少的XML配置
  • 基于组件(类似于GUI逻辑)
  • 关于框架Eclipse/NetBeans插件或支持的好教程/书籍
  • (没有MyEclipse或任何衍生版本)
  • Hibernate(或JPA)友好

其中哪一个(或者还有另一个?)最适合我?你为什么这么认为?

I was C++ WinForms developer and then I swiched to Java Swing. Now I need to do web application, but I have strong background of GUI development so I want to put it in use. So I was looking for some nice Java-based frameworks, and two of them appear to be the thing what I am searching for :

  • Apache Wicket
  • Google Web Toolkit

Here are things that I expect from framework :

  • Pure Java (no Scala, Groovy or whatever!)
  • More Java coding, less XML configuring
  • Component-based (similar to GUI logic)
  • Nice tutorials/books for framework
  • Eclipse/NetBeans plugins or support (no MyEclipse or any derviations only)
  • Hibernate(or JPA) friendly

What of these (or is there another?) suits best for me and why do you think so?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

倚栏听风 2024-09-16 09:06:53

JSF 2.0 似乎很适合您的喜好。它是:

  • 控制器中的纯 Java,视图部分中的 Facelets
  • 主要是 Java 编码和注释,很少基于 xml
  • 组件(不像 GWT 那样类似于 GUI 逻辑,但仍然)
  • 很多教程
  • Eclipse/NetBeans 插件或支持。 Eclipse 在网页编辑器方面一直很糟糕。不过有自动完成功能。 NetBeans 的支持可能对
  • JPA 更友好 - 您可以直接使用您的实体。

JSF 2.0 seems like a good one for your preferences. It is:

  • Pure Java in the controllers, Facelets in the view part
  • Mainly Java coding and annotations, little xml
  • component-based (not that similar to GUI logic as GWT, but still)
  • Lots of tutorials
  • Eclipse/NetBeans plugins or support. Eclipse has always been bad with web page editors. There is autocomplete though. NetBeans' support is perhaps better
  • JPA friendly - you can directly work with your entities.
他不在意 2024-09-16 09:06:53

你看,有很多选择。我认为你的选择是明智的,Wicket 或 GWT 都是你要寻找的(事件提到了 Vaadin、JSF 等)。问题是:实际上没有更好的了。它们相似,不同,但不能真正说“更好”。

我建议:用 wicket 做一个演示项目。与使用 GWT 进行(可能相同)演示项目相比,然后选择您更喜欢什么。考虑写作的舒适性、可用的插件等等。而且,这取决于您是否需要发送更多数据(gwt)或更多页面(wicket)

You see, there are plenty of options. I think you chose wisely, either Wicket or GWT are what are you looking for (event mentioned Vaadin, JSF etc.). The thing is : there is actually no better one. They are similar, different, but can't really say 'better'.

I suggest : do a demo project with wicket. Than do (possibly same) demo project with GWT and pick what do you like more. Think of comfortability of writing, available plugins and so. And also, it depends on if you need send more data(gwt) or more pages(wicket).

懒猫 2024-09-16 09:06:53

虽然我没有使用过 GWT,但一些朋友告诉我它有点混乱。

我已经在 Wicket 工作了半年,我现在能告诉你的是,我现在得到的每一个框架对我来说都显得很混乱。使用 Wicket,您可以获得简单的标记和面向 OOP 的编程,因此您制作的每个组件都可以完全重用。

我建议您使用 Spring 来配置 hibernate 会话工厂,但您可以使用自己的对象打开和关闭事务来运行 Hibernate。

Wicket 邮件列表让我每周收到超过 100 封邮件,因此社区非常活跃。

Altough I didn't worked with GWT some friends told me it is a bit messy.

I have worked half year with Wicket and all I can tell you now every and each one of the frameworks I get now seem messy to me. With Wicket you get markup simplicity and OOP oriented programming so every component you make can be fully reusable.

I recommend you using Spring to configure hibernate session factory but you can run Hibernate with own Objects opening and closing transactions.

Wicket mail lists let me over 100 mails a week so the community is very active.

浅浅淡淡 2024-09-16 09:06:53

我建议您看一下 Matt Raible 的“比较 Kick Ass Web 框架”演示文稿。他将自己的建议缩小为使用 Flex + Rails 或 GWT + Grails。根据您上面提到的标准,它可能不是您正在寻找的内容(GWT 是,但 Grails 不是),但是这是一本有趣的读物,他的博客对此主题有一些很好的讨论。

I would recommend you take a look at Matt Raible's 'Comparing Kick Ass Web Frameworks' presentation. He narrows down his own recommendation to either using Flex + Rails or GWT + Grails. Based on the criteria you mentioned above it might not be what you are looking for (GWT is but Grails not) however it's an interesting read and his blog has some good discussions on the subject.

哥,最终变帅啦 2024-09-16 09:06:53

我的建议可能最接近您想要的。查看 Vaadin 框架
这与您过去使用的 GUI 开发最为接近。

尽管前面描述的所有框架都很好,但没有一个像 Vaadin 那样接近 GUI 开发。

My advice would be probably the closest to what you want. Check out the Vaadin framework.
This one is as close as you can get to the GUI development you used to.

Even though all of the previously described frameworks are good, none comes as close to GUI development as Vaadin does.

著墨染雨君画夕 2024-09-16 09:06:53

如果您的背景是 Swing,那么从我所做的小实验以及我的几个同事的令人振奋的声明来看,GWT 或其变体之一(例如 GWT/EXTJS),我认为他们实际上将其称为 GXT,例如那个,最接近这个范​​式。有趣的是,您知道自己正在编写 Java,而生成的结果是生成的 HTML 和 Javascript。我一直担心它只写代码,但我确信事实并非如此。

YMMV。

If your background is Swing, then from the little experimentation I've done, and the rousing declarations of several of my co-workers, GWT or one of its variants, like GWT/EXTJS, I think they actually call it GXT, something like that, most closely match that paradigm. Where it gets kind of funky is the knowledge that you're WRITING Java, and what is coming out is generated HTML and Javascript. I've always been afraid of it being write only code, but I'm assured that it isn't.

YMMV.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文