When not to use Google Web Toolkit?

1 Answers

Ive been using GWT since 2011. As any technology, it has its pro and cons. Main benefit, by far, is the fact that if you have a team with strong java skills (even maybe developers that worked with Swing) then GWT is a smooth step. It will be more familiar and probably you will get things done faster (at first) with it in comparisson with other technologies. Now, you said that it is a "major in-house webapp", so take in consideration that compilation time is a BIG ISSUE in GWT. See this GWT report from Vaadin https://vaadin.com/gwt-report-2012-portlet/download/1150559483/Future-of-GWT-Report-2012.pdf So, I believe that only in the described scenario using GWT would make sense.


I'm considering use of GWT on a major in-house web app development project, namely it's major advantage in my eyes is the cross-compilation to Javascript which would (at least theoretically) help my team reduce the size of tech stack by one.

However, having been burnt before (like most devs), I would like to hear from programmers who did actually use it on any problems with GWT which would hamper, or limit, it's use within a certain problem domain.

When do you not recommend using GWT, and why?

We have been working with gwt for almost 2 years. We have learned a lot of lessons. Here is what we think:

  1. Dont use third party widget libraries especially gwt-ext. It will kill your debugging, development and runtime performance. If you have questions about how this happens, contact me directly.

  2. Use gwt to only fill in the dynamic parts of your apps. So if you have some complex user interactions with lots of fields. However, don't use the panels that come with it. Take your existing stock designer supplied pages. Carve out the areas that will contain the controls for your app. Attach these controls to the page within onModuleLoad(). This way you can use the standard pages from your designer and also do all the styling outside the gwt.

  3. Don't build the entire app as one standard page that then dynamically builds all the pieces. If you do what I suggest in item 2, this won't happen anyway. If you build everything dynamically you will kill performance and consume huge amounts of memory for medium to large apps. Also, if you do what I am suggesting, the back button will work great, so will search engine indexing etc.

The other commenters also had some good suggestions. The rule of thumb i use is to create pages like you were doing a standard web page. Then carve out the pieces that need to be dynamic. Replace them with elements that have id's and then use RootPanel.get( id ).add( widget ) to fill those areas in.