Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to proceed learning GWT [closed]

Tags:

gwt

I am trying to learn GWT, but have no clue about the same.

I have a java background and have all through my years of experience worked on Struts, Spring, Grails and such MVC Frameworks.

I am to learn GWT for a project and am looking for help as to how I can go about it.

Could someone give me an idea of the learning curve when it comes to a technology like this.

Thanks in advance!

like image 772
MAlex Avatar asked Jul 22 '11 10:07

MAlex


2 Answers

As Hillbrand pointed out, given the pace of GWT's development, most books you'll find will not teach you about the latest features. But that's fine, as long as you are willing to learn from other sources as well, most important of them being the GWT's own online documentation. Specifically you'll want to read release notes versions that came after your books publishing.

As you're an experienced Java developer, you'll most likely want to know how GWT compares with the technologies you already know. But before you go down that path, I recommend that you get familiar with features that are unique to GWT's (therefore quiet uncomparable). For example:

1. Java to Javascript compilation s First thing you must have heard about GWT is that it compiles Java code into JavaScript. But,

  • How do you control the compilation, for example what gets compiled, and otherwise influence the compilation process?
  • Are all Java language features available on client-side?
  • What standard JRE libraries are available on the client-side?
  • How GWT compiler optimize output for different browsers while still keeping the compiled output size small?
  • And, offcourse, how do you use compiled javascript in your page?

These are some of the questions that you should be able to answer to assume that you're fairly familiar with the compilation process

2. Development Mode (former versions were known as hosted mode)

Development mode is another unique feature of GWT. What it does is to let you run your app in browser without compiling the java into javascript first. But it's not sort of just-in-time compilation. The development mode lets you debug your GWT app as it was a normal Java program. Essentially, you can use your Java debugger to put breakpoints in Java source and inspect the variables etc.

3. Deferred Binding

At first you don't need intricate knowledge of Deferred Binding internals. But if you are like me, every time you'll see GWT.create(SomeClass.class) in code, you'll want to know what this odd looking line does.

Simply put, this is the feature that lets GWT compiler do many interesting things. As you learn more about this feature, the crucial thing to keep in mind is that this feature is all about compilation process. Code GWT.create(SomeClass.class) looks like a familiar static method call, but GWT compiler treat it differently, very differently indeed.

like image 116
Tahir Akhtar Avatar answered Sep 22 '22 11:09

Tahir Akhtar


The GWT documentation is a good starting point and watch the Google I/O presentations on GWT, start with the most recent it covers the newer features.

But if you (also) want to read a book make sure it's a recent version. GWT changes fast, and therefor most books are rather outdated. Actually some of the newer GWT features are not or very briefly covered in currently available books.

Here are 3 books which are more recent:

GWT in Action, Second Edition

Essential GWT: Building for the Web with Google Web Toolkit 2

Google App Engine Java and GWT Application Development (While this book covers also Google App Engine, it contains a lot of usefull examples)

I would avoid starting with Ext GWT, as it's a framework build upon GWT. Just learn the GWT basics and then decide if you want to use and additional framework.

like image 36
Hilbrand Bouwkamp Avatar answered Sep 19 '22 11:09

Hilbrand Bouwkamp