0

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.

Community
  • 1
  • 1
Oliver Zheng
  • 7,831
  • 8
  • 53
  • 59

5 Answers5

1

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
  • 854,459
  • 170
  • 1,222
  • 1,395
  • 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 Sep 17 '09 at 05:57
  • GWT is only a client side framework. I need a server side framework. – Oliver Zheng Sep 17 '09 at 20:13
  • 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! – Oliver Zheng Oct 22 '09 at 06:15
1

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
  • 29,022
  • 11
  • 55
  • 82
0

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
  • 922
  • 2
  • 11
  • 19
  • 1
    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 Sep 21 '09 at 12:46
0

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,241
  • 1
  • 14
  • 31
0

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
  • 115,893
  • 19
  • 128
  • 203