GeeCON Prague 2014*
The moose likes Spring and the fly likes Spring Roo and GWT Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring Roo and GWT" Watch "Spring Roo and GWT" New topic
Author

Spring Roo and GWT

cecilia fava
Greenhorn

Joined: Oct 26, 2011
Posts: 8
I'd like to know how to use GWT with Spring Roo, I was trying Spring Roo with a tutorial but it generates skeleton for MVC, and GWT seems to use MVP.
Is it possible ?
Thanks!I'd like to win the book!
Ken Rimple
author
Ranch Hand

Joined: Jul 20, 2010
Posts: 63

Hi, Cecilia

Since I'm a guest author, I have a news flash confession to make: I'm NO GWT expert. ;)

I tried, I really did. I spent lots of time with the Roo GWT add-on. Back in 2010, while I was writing the first drafts of the book, the add-on kept breaking and being fixed, and then it went to the MVP pattern, going through a lot of changes as well. So I focused on other parts of the book so that I could get it done.

An honest confession part 2 - I do not like MVP. It's too bloated with code in my opinion to easily comprehend. (ducking)

An honest confession part 3 - I had to back off of GWT for the book for the 1.2.1 release because it didn't work for me, no matter what I tried.

I am trying it right now on Roo 1.2.2, which I believe will work. The sequence is:

$ roo script expenses.roo
(lots of output)
$ mvn gwt:run

This let me build the app, except for when I got the GWT runner up, none of my browsers were able to run it - I have Safari, Firefox, and Chrome, and all of them recent versions. So, I'm bleeding edge on three browers? Strange.

So to run it without development mode, you can do mvn package jetty:run and then hit the server with a regular browser. That does work, but you lose the GWT runner.

Update - also, it seems to be buggy in Roo 1.2.2 - I filed a JIRA just now while testing before responding to you: it's here if you want to see whether I'm wrong or if a bug needs fixing:

https://jira.springsource.org/browse/ROO-3175

(it just took my macbook air 5 minutes + to build the war file, most of which was setting up the permutations of web browsers, which you can cut down by editing some XML).

Structure:

What you'll see is that the server portion contains about 10 Java class files. The MVP client portion is well over 150, and I'm not counting the generated XML files and images. For the client. It's huge. We are talking about three domain models. It may be a wonderful architecture, but there was no way to summarize that (let alone comprehend it) in 10-15 pages and fit a good detailed review into the book, especially when more important things needed to be addressed.

I know that Google I/O back in 2010 had a whole seminar on MVP - it's an hour long - so you could search that up. The problem is that with MVP installed, you seem to have to manually back off of that pattern or install GWT directly.

Ken Rimple
ken.rimple@gmail.com
Co-author, Manning Spring Roo in Action
I teach for Chariot Solutions (Spring, Maven, Hibernate, other courses). Schedule here
james gustard
Greenhorn

Joined: Nov 29, 2002
Posts: 1
Hi, running roo> expenses.roo will run the expenses roo script which sets up a GWT MVP based project.
 
GeeCON Prague 2014
 
subject: Spring Roo and GWT