Activate your free membership today | Log-in

Wednesday, February 28th, 2007

GWT-Spring Integration Demystified

Category: Framework, GWT, Java

Gabi S. in what appears to be her first blog post has already started off with a bang. In tutorial form she shows how to integrate GWT with Spring.

To integrate [the GWT application] with Spring we only have to register our GWT servlet in our web.xml so we can simply use Spring’s ServletForwardingController to call services by name. We also have to modify a bit our GWT client to reflect a path change we have to do…The ServletWrappingController [defined in the Spring application context] controls the RemoteServiceServlet’s lifecycle completely, emulating the servlet-container.

So once you have instantiated your GWT services with Spring, you are free to use all of that good stuff, like inversion of control (IoC), aspect oriented programming (AOP), etc. For those wanting a quick overview of Spring, the “swiss army chainsaw of Java and .NET frameworks,” have a look here.

Note: we are using Spring on the server side here, not the client side. For IoC in the browser, see the earlier post on JDA.

Update: The misspelling of “Demystified” in the referenced blog post did not trigger the inner speller in me. It has been fixed.

Posted by Dietrich Kappe at 9:30 am

++++-
4.3 rating from 37 votes

5 Comments »

Comments feed TrackBack URI

*Demystified ;)

Comment by Joshua Jonah — February 28, 2007

Yah, exactly. After many years of Spring/J2EE, I’d say that ‘demystifying’ has now reached marketing status and no longer exists as a layman term. In fact - well, never mind, I won’t go down the Spring/J2EE road. *shudders*

Comment by j_l — February 28, 2007

Demistified ?
It’s time to use Spellify !!!

Comment by jcm — February 28, 2007

The Java EE makes us to use so many XML deployment descriptors and XML configuration files. This is the real issue . Nothing to demystify here - just get rid of the XML stuff.

Comment by Jan — March 6, 2007

I agree that Java EE has historically used too much XML but I like Spring’s approach to declare IoC using XML as all my beans are in one XML file. If my dependencies were declared, lets say using annotations, then the declarations would be decentralized.

Comment by James Perry — November 10, 2007

Leave a comment

You must be logged in to post a comment.