views:

235

answers:

6

I read through a few threads (simple web framework, java web development, etc). Very informative. However I have not seen a focus on the AJAX side of things. For the app I am trying to create, most of the client side will be written in Google GWT, and JSON will be used to communicate with the server side. In that case, all templating is pretty much useless.

For my purposes, which framework would be the simplest to setup and easiest to learn?

Thanks.

To clarify, I want a server side framework. GWT is great for client side, but I need something to generate json responses on the server side.

+1  A: 

None at all, most likely: GWT is framework enough, given that's what you're using. The only reason I can think of to add anything else might be if there was some special effect you absolutely craved (but if you've chosen to go GWT, my recommendation would be to give up on such special effects),

Alex Martelli
http://www.google.com/search?q=gwt+effects
GWT ROCKS MAN,Its Support for AJAX is Amazing.And the UI creation is breeze (if you know CSS)My vote goes to GWT
Salvin Francis
GWT is only a client side framework. I need a server side framework.
MTsoul
Actually, with 2 weeks of GWT coding in, it turns out they do quite a bit of server handling for you with all the servlets and what not. No framework is really necessary beyond some libraries (which aren't really frameworks). Thanks!
MTsoul
A: 

You can try dwr http://directwebremoting.org/dwr/index.html

Xinus
I like DWR, it's all good and useful, but I'm not sure if it's appropriate here... If GWT is used, doesn't that already handle Ajax communication between client and server?
Jonik
yep, but DWR is dedicated for ajax and will be easier to use if we require some serious ajax functionality, GWT is also good...
Xinus
A: 

I've had pretty good luck with the Dojo Toolkit. Make sure to download the full toolkit (Dojo, Dijit and Dojox) which you'll find at the downloads page.

Their 'Hello World' tutorial is pretty useful for getting started.

Lee Fogel
I want a server side framework, not javascript framework.
MTsoul
To echo one of the responses on the "simple web framework" post, Spring MVC is quite the powerful utility. Having just learned it through a training program, I would say it is not *easy* to learn (tons of XML configuration files that need to be perfect to a t), but it certainly is powerful. Once configured properly, it makes your actual Java code a lot more maintainable.
Lee Fogel
A: 

You could could give IceFaces a try. It's a Ajax framework based on faces technology. Works really great and magically, also comes with a good documentation and tutorial.

Dominik
+1  A: 

Ajax/JS by nature functions mostly on client side and you want to use it but want to run it on server side? Are you sure you're not trying to hammer a square block into a round hole?

Reading through your question it seems to me what you're really asking is for a way to abstract a layer which provides JSON for your client side UI. Most web frameworks such as GWT deliberately abstract this part away but still include it in their inner workings: it would indeed be rather stupid for an Ajax web framework not to support data transfer between the view layer and the rest of the system!

However, if you really want to create your own custom component for serving JSON, then I suggest you take a good look at Servlets and mix that with any of the gazillion available JSON libraries listed at JSON.org.

And if you still really, really want to run your client side view logic on server, Vaadin could do the trick for you. In practice Vaadin really runs GWT on the server side and just serves static stuff generated by the server side GWT but from what I've understood the difference has been abstracted away.

A huge word of warning though, for me it sounds like you really want to reinvent the wheel here while you shouldn't. You really should reconsider your architecture and/or deepen your knowledge of GWT and web frameworks in general, the "framework" part usually hints that it's not just the V from MVC Model 2 but at least V and with M bindings.

Esko
A: 

You should look at one of the REST based frameworks, like Jersey, Restlets, or RESTEasy.

The main reason is that these frameworks make binding and working with JSON easy. Most of the other systems are designed for HTTP POST encoded data, which is not JSON.

Will Hartung