GWT - Angular/React Migration & Integration

1,192 views
Skip to first unread message

Thomas

unread,
Apr 15, 2020, 8:51:59 PM4/15/20
to GWT Users
Hi all,

I've been an a GWT user for maybe a decade. In my company we've build a large enterprise app over the last 8 years based on GWT with a GWT mobile client running in Cordova. Great app and I generally like GWT, but besides long compile times and the uncertainty about the future of GWT, I'm struggling to find talented developers who can and want to work with GWT.  We are a small company and it's impossible for us to migrate everything in a "big bang" approach, so my idea is to take migrate usecase by usecase. 

This brings me to my question: 

Which modern JS framework (Angular/React/other?) integrates best with GWT? 
I'm thinking of either the app running in a GWT shell (like "GWT Turducken Pattern") or GWT activities running inside a JS shell.

Can anyone point to recent strategies, examples or would be able to say which framework integrates best with GWT?

Cheers,
Thomas

Jens

unread,
Apr 17, 2020, 9:11:03 AM4/17/20
to GWT Users
Kind of in the same situation and I figured that using an iframe approach is probably the best idea. So you would need to refactor your app in a way that you can launch an external application in an iframe for a given menu item, basically the content area in your app should be an iframe. That way you could develop future content using a different framework (or even multiple different frameworks!) and also refactor current/old GWT content to fit into the iframe solution which shortens the compile time for these new minimal GWT content applications. Finally you get the freedom to only update parts of your application instead the whole beast.

However when doing so and your app uses history tokens / pushstate you need to figure out a good way to update the browser main location bar from within the iframe.

Personally I would consider using Angular, Vue or Svelte (with Sapper being the Svelte app framework). While Angular and Vue both use virtual DOM, Svelte does only look like it would use a virtual DOM but in reality it compiles down to direct DOM operations which makes it more performant than a virtual DOM based solution. I would only use React if there are thoughts about using React Native as well, but then Flutter from Google might also be interesting.

-- J.

Thomas

unread,
Apr 20, 2020, 8:00:57 PM4/20/20
to GWT Users
Thanks Jens. If I paraphrase in my words, you would keep the "shell" (menu items etc) and have iFrames for new functionality? 

Sounds like a reasonable approach, although I'd prefer to have the "shell" in the new technology and have iFrames for the old GWT modules.

Have you come across any resources/examples that you can share?

Cheers, Thomas

Michael Conrad

unread,
Apr 21, 2020, 8:23:45 AM4/21/20
to google-we...@googlegroups.com
Don't know if this will help, but you can set the rootpanel for a GWT component using an id, say on a div tag.
--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/4a721edc-2b87-47a5-92d4-7541eca85726%40googlegroups.com.

Thomas Buckel

unread,
Apr 21, 2020, 8:45:16 AM4/21/20
to google-we...@googlegroups.com
It does somehow. I reminded myself of that today as well. Guess it just feels unusual to me at this stage. Also investigating the iFrame option.


You received this message because you are subscribed to a topic in the Google Groups "GWT Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/XG7w2IvHl5w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/4156ed96-0396-dc98-88f8-0b09a0c9f9a1%40newsrx.com.

Howard Yeh

unread,
Apr 24, 2020, 3:23:47 PM4/24/20
to GWT Users
Similar situation.  Our single page app SPA is actually made up of many separate sub pages, thus we stayed with GWT root and "injected" Angular by adding new url/page in Angular, and thus breaking the SPA experience a bit but we try to pass some info over to make it less jarring and more seamless.
Now we have about half and half GWT and Ang pages, and things work fine if we keep a page in 1 technology.  We did try a deep integration of the 2 within a page, but that was pre js-interop and angular 1.x, and thus was very painful and definitely not recommended.  I'd hope now with js-interop and much new js framework would be fairly doable if you wanted to mix the 2, but still if you can try to keep big pieces within 1 technology and limit the integration it'll reduce risk and problems.
FWIW while I'm fully aware of shortcomings of GWT, the team is still way more productive doing GWT than Angular, and I've seen more bugs with Angular just because the "flexibility and power" of JS, so I'm still on Team GWT. :)

Thomas

unread,
Apr 27, 2020, 8:32:52 PM4/27/20
to GWT Users
Thanks Howard.

Definitely not planning a deep integration...

Interesting insight about GWT vs JS in terms of productivity. GWT always felt 'enterprise' to me with large apps in mind.

Peter Donald

unread,
Apr 27, 2020, 8:57:21 PM4/27/20
to GWT Mailing List
FWIW A couple of years ago we decided to move away from GWT and move
to react+mobx+typescript under the assumption we could produce apps
faster. After several months in that world, we came back to the GWT
world. Mostly this was due to productivity.

Except for some legacy applications we don't use classes from the GWT
runtime and instead use react and arez (a mobx alternative) - which is
much more productive. We still have somewhat slow refresh times for
large apps but our prototyping with J2CL seemed to indicate even that
would go away and in fact, be faster than the equivalent in JS land
(!). JS still has the advantage of a larger set of libraries and
framework-specific speed Improvements (i.e. hot reloading in react) we
certainly have no interest in going back ;)
> --
> You received this message because you are subscribed to the Google Groups "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/78d169e4-7b2a-4b4a-840f-7626faed24e2%40googlegroups.com.



--
Cheers,

Peter Donald
Reply all
Reply to author
Forward
0 new messages