Learning GWT

| | August 7, 2015

I develop web applications and in my job so far, I have been waging battles with various browsers whenever some js or css quirks happen. I believe using GWT will help me tremendously from what I understand from this description.

Writing web apps today is a tedious
and error-prone process. Developers
can spend 90% of their time working
around browser quirks. In addition,
building, reusing, and maintaining
large JavaScript code bases and AJAX
components can be difficult and
fragile. Google Web Toolkit (GWT)
eases this burden by allowing
developers to quickly build and
maintain complex yet highly performant
JavaScript front-end applications in
the Java programming language.

What is the general opinion on GWT ? How easy is it to learn and use it ?

EDIT: I am a Java developer !

4 Responses to “Learning GWT”

  1. Personally if you can find an alternative to Ext-GWT do, as the support is awful, the whole thing is buggy and ill conceived. In Addition, I have failed to find any tutorial on running Ext-GWT in Eclipse. I have successfully installed and run a GWT sample app in Eclipse with small fuss, but now I wish to use the Ext-GWT library, they cannot play together. The Eclipse GWT Plug-in sets up its own little environment, which won’t accommodate Ext-GWT components and visa-versa. For example how does Ext-GWT fit in with GWT moduleOnloadFunction, when it needs its own entry point? We regularly use the JS library at work which is fine, but the forums are abysmal, the moderators are often rude, or too vague, and there appears to be no such thing as a “simple answer”

  2. I came from a C# background and the switch to Java and GWT was not a painful one. Once you understand the concept of asynchronous RPC calls, JSNI and similar you are on the right path.

  3. If you’re coming from Java background or are used to something like Swing I think it makes sense to use GWT as it keeps you coding in a familiar environment with familiar concepts. The other good reason to use GWT is if your team consists of mostly Java developers and very few web developers. In these cases it should be fairly easy to learn and use.

    On the other hand, I’ not sure it’s the right level of abstraction for building most web applications, especially if you’re not building a desktop-like application but web pages mixed with rich functionality.

    Javascript is a powerful language, more suited for web in some ways than Java (Groovy could amend that, but I’m not sure how easy it is to integrate with GWT), there are plenty of mature JS frameworks that keep you away from most browser quirks and offer just the right level of abstraction, there are unit testing frameworks for JS, and there are some good programming practices to make your code more managable.

    For writing web apps I prefer doing client development on the client, and would like to see browsers evolve more in that direction instead of becoming containers for various sandboxes like Flex or GWT.

  4. You don’t say if you’ve got any background with Java. If you don’t, then, well, I can’t speak to what your learning curve may be.

    However…as someone who’s been working with Java for ~9 years, and much of that time spent with Swing, I’ve found GWT very easy to learn.

    The widgets are different from Swing, so that takes some getting used to. But, from my perspective, it’s really no different than learning any other library.

    Personally, I love that I can use IntelliJ (my editor of choice) and take advantage of all the fantastic Java tools that help me write better code. (BTW…that’s part of the GWT mission.)

    I love the fact that this is a vibrant, and highly active toolkit, with lots of people really interested in making it better. (Again, take a look at the discussion group, or even browse through the Contributor’s discussion group.)

    If you want access to more or different widgets, there are lots of projects looking to fill the gaps:

    (NOTE: I am NOT endorsing any of these project or commenting on their relative merits, just trying to provide some references…)

    I think if you dig around on the web, especially taking a look at the GWT Discussion Group you can get a good feeling for what others are doing with GWT.

    Having said all that, beware…you will still find some issues with how things render on IE6 vs IE7 vs FireFox 3, vs… I’ve not written a webapp in straight JavaScript or with any other toolkits, so I can’t say how much better GWT is in this respect. All I know is that in 10+ months of working on the application I work on, we’ve encountered only a few cases where we had to specialize CSS for one browser or another.

Leave a Reply