tags:

views:

1121

answers:

6

What is the best java based web framework backend for a GWT frontend?

Possible Backends: seam, jsf, spring web ... ?

Specially I am interested in practical experience and PROS and CONS.

Btw: - No dynamic typed Languages please - Have anybody tried seam or spring for this?

+2  A: 

JAX-RS (JSR 311), via Jersey (reference implementation)

PROS

  • simple yet powerful annotation/POJO based
  • builtin with JEE application servers (notably glassfish)
  • tool support (e.g. netbeans web services explorer, EJB integration, spring/guice integration)

CONS

  • I dunno!
dfa
Has other people successful used it already?
KlausMeier
some poople used restlet/JSR311 as GWT backend. Since they are separated tiers I don't see any "incompatibiliy"
dfa
+1  A: 

It depends to a degree on what sort of client-server communication you want to use. if you use Google RPC, your choices are limited due to the way GWT RPC is wired up on the server - it preptty much dictates the use of servlets, with no MVC framework.

If, on the other hands, you want to talk JSON or XML over the wire, then the choice of web framework is pretty much up to you, I wouldn't say one is any better than other specifically for this job. You should pick whichever framework you're most comfortable with generally.

skaffman
GWT RPC can be made to work with spring controllers quite easily (which of course, is a servlet implementation hidden from you)
Chii
+3  A: 

The best one I have found is EJB3/JPA. So your GWT talks via RPC to your web tier, which in turns instantiates EJB Session Beans to handle all of the business logic and persistence. Your JPA Persistence POJOs can be used all the way from the back end into GWT, so you don't have to do any kind of translation or conversion. It keeps your code nice and clean, and leaves you free to create whatever paradigm you want (fat client, thin client, mvc, whatever).

Pros:

  • Clean implementation, JPA POJO's can be passed all the way from the back end to the front end
  • Flexibility to build the back end with whatever design pattern takes your fancy
  • No need to write any kind of code for translation over the wire, just use the built in GWT RPC
  • Based on industry standards, so documentation/support is widely available

Cons:

  • You need to use only code that compiles in GWT in your POJOs. You shouldn't have business logic in their anyway, so most of the time this is not a problem.
rustyshelf
+1  A: 

grails pros:

  • quick development
  • trivial JSON implementation over HTTP or GWT RPC if you want
  • incredibly productive
  • tons of easy plugins

cons:

  • you'll be tempted to use grails for all of your backends.

Anyone who suggests something as heavy as Seam or JSF isn't realizing that GWT clients are stateful and you don't need anything outside of the easiest action-request framework you can find (which grails currently is)

puppetluva
Thank you for the answer, but i don't want to use groove or any other dynamic typed language.
KlausMeier
That is unfortunate, because grails has one of the lowest cost of entry into GWT serverside integration in any web framework i ve seen (other than vanilla servlets, and even that has more work) - its essentially installing a plugin, and writing a service, no configuring, no nothing!
Chii
A: 

I prefer seam as backend: is has great security support and it support the greate conversion pattern.

Peter Paulus
Conversion pattern?
BalusC
Where are the CONS?
Amir Moghimi
A: 

grails sounds like it might be good, is there some docs that show how to get started with grails and GWT? I assume grails was ways of dealing with databases, etc.

dave