Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the main downfalls when using Google Web Toolkit (GWT)

After a long debate between many RIA/Ajax framework, we settled on GWT. When reading about it, this framework seams to be doing everything well and easy. But like any technologies, there is always down side and we we learn them the hard-way.

What are the main downfalls or problems when using Google Web Toolkit (GWT)?

(eg: Back/Forward Button support, Slow Response time, Layout Positioning, JavaScrit bugs, etc)

So far, I got the following from the response:

  • Lots of code for simple UI
  • Slow compilation

Thank you

like image 297
Aerosteak Avatar asked Feb 19 '11 04:02

Aerosteak


People also ask

What is Google Web Toolkit used for?

Google Web Toolkit (GWT) is an open source Java software development framework that makes writing AJAX applications easy. With GWT, you can develop and debug AJAX applications in the Java language using the Java development tools of your choice.

Should I use GWT?

If you are a Java veteran with experience in Swing or AWT, then choosing GWT should be a no-brainer. The learning curve is the least with this background. Even if you are not experienced in Java GUI development, the experience in working on server-side Java for years will come in handy while developing GWT apps.

Do people still use GWT?

Productivity for developers, performance for users GWT is used by many products at Google, including Google AdWords and Google Wallet. It's open source, completely free, and used by thousands of enthusiastic developers around the world.

Is GWT popular?

GWT (Google Web Toolkit)It is more popular than native JSF as it makes it easy to maintain complex JavaScript user interfaces with Java code.


1 Answers

I have been using GWT for nearly 2 years. Although I could be called a fanatic about GWT, there are some issues that one should know ...

  1. As others have said, JavaScript compilation is slow. My application requires nearly 4 minutes for core i7 CPU, 8 GB memory. Total size of generated JavaScript is about 5 MB. But thanks to development mode, compilation to JavaScript is not needed frequently.

  2. GWT RPC is extremely slow in development mode. It is 100 times slower than hosted mode. It was quite a big problem for us. We did consider giving up GWT just because of this reason. the reason for this sluggish performance of GWT RPC in dev-mode is serialization. Serialization of types other than String is unbelievably slow in dev mode. We did implement our custom serialization, it is nearly 30 times faster than GWT built-in serialization.

  3. Claims that writing GWT application requires only knowledge of Java is just an illusion. You should have solid information about CSS and DOM. If you don't, you will spend too much time debugging your user interface.

  4. You should consider that you can only use a small subset of the JDK to implement GWT applications. Reflection is not available; you should use third party libraries, such as GWT ENT, or write your own generator for reflection.

  5. Another caveat that one should consider is the size of generated JavaScript by the GWT compiler. Most of the GWT applications consist of a single web page, as opposed to multi-paged traditional web applications. Therefore, loading of the application requires significant time. Although it could be mitigated by using a multi-module approach and code splitting, using these techniques is not always straightforward.

  6. All calls to the server are asynchronous. You should adapt yourself to writing asynchronous code. And the downside of asynchronous code is it is more complex and less readable than the equivalent synchronous code.

like image 116
Gursel Koca Avatar answered Sep 29 '22 16:09

Gursel Koca