开发者

Help me choose Java web framework [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 12 years ago.

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?


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.


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).


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.


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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜