帮我选择Java Web框架
我是 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
JSF 2.0 似乎很适合您的喜好。它是:
JSF 2.0 seems like a good one for your preferences. It is:
你看,有很多选择。我认为你的选择是明智的,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).
虽然我没有使用过 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.
我建议您看一下 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.
我的建议可能最接近您想要的。查看 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.
如果您的背景是 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.