How to Migrate Google Web Toolkit Applications

Learn why it’s time to leave GWT behind, and get effective ways to migrate your GWT applications.

Google Web Toolkit applications are dinosaurs in today’s instant, responsive world. Google Web Toolkit, or GWT, is an open source toolkit that allows developers to create web applications using Java. It is known for slow performance and presents significant challenges for building responsive applications. Given the growth of HTML5 and modern JavaScript frameworks such as React and Angular, developers are making the shift from Java toward these technologies.

An imminent challenge for IT leaders and front-end development teams alike is when to migrate from GWT to HTML5 and how to re-architect Google Web Toolkit applications.

In this article, we’ll discuss why it’s time to leave GWT behind, and recommend effective ways to migrate your GWT applications.

GWT: Out-of-Sync and Out-of-Date

GWT had mileage in a different technological era. The toolkit GWT once presented a novel solution to the problem of creating complex web UIs leveraging experienced Java developers. At the time, HTML5 did not exist. JavaScript frameworks and tooling were still in their infancy.

Finding skilled front-end developers was difficult. With GWT, developers could develop and debug applications solely in Java while using the Java development tools of their choice. When the application was deployed, the GWT cross-compiler translated the Java application to standalone JavaScript files that ran in the browser.

Google Web Toolkit Applications are slow

The Java-to-JavaScript compilation process is tedious and inefficient.

However, today, this Java-to-JavaScript compilation process has been called “dreadfully slow.” As one developer site noted:

It’s ‘go get a cup of coffee and read the paper slow.’ Our current compilation time is nearly seven minutes and requires 3.3 gigabytes of memory.

This inhibits the agile development and continuous build process, reducing developer team efficiency. Right now, the story for creating web applications is dramatically different.

JavaScript is Far More Advantageous

JavaScript’s capabilities over the years have advanced by leaps and bounds. The latest release, “ES6” adds modern features to the language that make it more suitable for developing complex applications. Additionally, JavaScript tools and frameworks have matured and now offer a development experience approaching that of Java. With Node.js, JavaScript has even found its way to the server. The asynchronous, event-driven nature of JavaScript has proven to be advantageous for networking and creating API’s. As a result, it has become easier to find developers with JavaScript expertise.

Employ Responsive Design Capabilities…Yesterday

Users now expect the same experience on mobile as desktop. In order to adapt, companies are employing “responsive web design” to craft sites that provide an optimal viewing and interaction experience with a minimum of resizing, panning, and scrolling—across a wide range of devices. This approach requires rigorous control over HTML structure, which is further impetus to migrate Google Web Toolkit applications.

4 Specific Difficulties with GWT today

1. Cross-Compiling Issues (AKA Getting Lost in Translation)

As one software developer client complained, “Java is a difficult language to work with.” We’ve found that an experienced Java developer will not be as efficient as a front-end developer leveraging modern UI frameworks. This is still true, even with GWT’s added capabilities to integrate modern JavaScript frameworks such as Angular as a stopgap.

2. Slow Performance

Google Web Toolkit applications slow on mobile

Google Web Toolkit applications perform slowly.

GWT was created in a time when mobile was not a concern. As a result, creating applications that perform well on mobile can be a challenge. Without being mindful, it’s easy to inadvertently generate large volumes of code with GWT. This can kill performance, especially on mobile devices. Since all the code is automatically generated, it is difficult to fine-tune the markup for optimum performance on mobile.  GWT now supports mobile, which does improve performance; however, there are limitations to the control of the generated code even in this instance.

3. No Separation of Concerns

Decoupling an API from a presentation tier allows for more flexibility, particularly when targeting different device platforms. Providing a clear delineation between code contexts allows for better organization and maintainable code base.

4. Lack of Fine-Grain UI Control

GWT provides a wide array of prebuilt controls in order to assemble a UI. However, creating customized UI components is difficult. Creating UI components from scratch is cost prohibitive.

Anticipate potential problems the GWT platform could have in your specific enterprise. For example, one banking client wanted a new UI for a special application. We analyzed their technical environment, the nature of the application itself, and determined that GWT offered no real performance benefits and there were other platforms with less risk.

How to Migrate Google Web Toolkit applications to a Modern JS Framework

1. Take Inventory

To start, partner with the right front-end development team to help you migrate platforms effectively. Identify UI components and Controller components in your current code base. Since the standard architecture is generally tightly coupled between the UI and the business logic controller, the delineation of where the UI ends and the controller starts can be fuzzy.

Work with a development team

Work with a development team to migrate platforms effectively.

2. Ensure API Enablement

API enable business logic controllers using RESTful services. Once the components have been inventoried, look into encapsulating and creating a clear delineation between the UI and the controllers. This way, the architecture will enable a componentized model and will help accelerate API enabling the business logic. If you are currently using GWT RPC or JSON over HTTP within the application, some refactoring will have to occur.

3. Set up GWT RPC Capabilities

GWT RPC allows for the passing of Java objects between the client side code and the business logic code. This pattern is similar to what is seen in popular frameworks such as Jersey and Spring. If the application leverages this pattern, it would be prudent to implement one of these two frameworks. These frameworks will convert your Java objects to JSON.

4. Enable a JSON over HTTP pattern

This pattern requires the developer to manually create the JSON using Java Strings. It is still recommended to leverage a framework like Jersey or Spring to reduce development time. Since the JSON string is built up manually, it is very prone to errors and will be very cumbersome to maintain.

Once the controllers are componentized, the quick release can be to leverage a framework to API enable the code and expose that functionality as a RESTful endpoint. If time permits, it’s advisable to see where code reuse can be implemented to create generic functions that can serve multiple portions of your application.

5. Pick your new design and JavaScript framework

Now that you’ve churned the ocean with your code base, it’s a good time to think about using good UX practices and methodologies to create a new version of your application that can leverage the more modern frameworks. A resulting benefit is that access to front-end developers will become easier and retention of those resources will be high.

Once a UI and visual design effort are under way, the right JavaScript framework(s) can be selected to create a rich user experience.

Code away.

Conclusion

Google Web Toolkit applications are outdated, operate too slowly, and present significant roadblocks for building a responsive UI. Seasoned developers have already seen a shift in skills trending toward working in platforms such as HTML5 and Node.js. High-profile companies are choosing the option to code in these up-to-date frameworks, taking advantage of increased platform performance, flexibility and development efficiencies.

Migrate platforms with our Enterprise Re-Platforming Solutions.

Considering migrating from Adobe Flex? Use our 5-Step Migration Assessment Framework to get started.

Learn why it’s time to leave GWT behind, and get effective ways to migrate your GWT applications.

Google Web Toolkit applications are dinosaurs in today’s instant, responsive world. Google Web Toolkit, or GWT, is an open source toolkit that allows developers to create web applications using Java. It is known for slow performance and presents significant challenges for building responsive applications. Given the growth of HTML5 and modern JavaScript frameworks such as React and Angular, developers are making the shift from Java toward these technologies.

An imminent challenge for IT leaders and front-end development teams alike is when to migrate from GWT to HTML5 and how to re-architect Google Web Toolkit applications.

In this article, we’ll discuss why it’s time to leave GWT behind, and recommend effective ways to migrate your GWT applications.

GWT: Out-of-Sync and Out-of-Date

GWT had mileage in a different technological era. The toolkit GWT once presented a novel solution to the problem of creating complex web UIs leveraging experienced Java developers. At the time, HTML5 did not exist. JavaScript frameworks and tooling were still in their infancy.

Finding skilled front-end developers was difficult. With GWT, developers could develop and debug applications solely in Java while using the Java development tools of their choice. When the application was deployed, the GWT cross-compiler translated the Java application to standalone JavaScript files that ran in the browser.

Google Web Toolkit Applications are slow

The Java-to-JavaScript compilation process is tedious and inefficient.

However, today, this Java-to-JavaScript compilation process has been called “dreadfully slow.” As one developer site noted:

It’s ‘go get a cup of coffee and read the paper slow.’ Our current compilation time is nearly seven minutes and requires 3.3 gigabytes of memory.

This inhibits the agile development and continuous build process, reducing developer team efficiency. Right now, the story for creating web applications is dramatically different.

JavaScript is Far More Advantageous

JavaScript’s capabilities over the years have advanced by leaps and bounds. The latest release, “ES6” adds modern features to the language that make it more suitable for developing complex applications. Additionally, JavaScript tools and frameworks have matured and now offer a development experience approaching that of Java. With Node.js, JavaScript has even found its way to the server. The asynchronous, event-driven nature of JavaScript has proven to be advantageous for networking and creating API’s. As a result, it has become easier to find developers with JavaScript expertise.

Employ Responsive Design Capabilities…Yesterday

Users now expect the same experience on mobile as desktop. In order to adapt, companies are employing “responsive web design” to craft sites that provide an optimal viewing and interaction experience with a minimum of resizing, panning, and scrolling—across a wide range of devices. This approach requires rigorous control over HTML structure, which is further impetus to migrate Google Web Toolkit applications.

4 Specific Difficulties with GWT today

1. Cross-Compiling Issues (AKA Getting Lost in Translation)

As one software developer client complained, “Java is a difficult language to work with.” We’ve found that an experienced Java developer will not be as efficient as a front-end developer leveraging modern UI frameworks. This is still true, even with GWT’s added capabilities to integrate modern JavaScript frameworks such as Angular as a stopgap.

2. Slow Performance

Google Web Toolkit applications slow on mobile

Google Web Toolkit applications perform slowly.

GWT was created in a time when mobile was not a concern. As a result, creating applications that perform well on mobile can be a challenge. Without being mindful, it’s easy to inadvertently generate large volumes of code with GWT. This can kill performance, especially on mobile devices. Since all the code is automatically generated, it is difficult to fine-tune the markup for optimum performance on mobile.  GWT now supports mobile, which does improve performance; however, there are limitations to the control of the generated code even in this instance.

3. No Separation of Concerns

Decoupling an API from a presentation tier allows for more flexibility, particularly when targeting different device platforms. Providing a clear delineation between code contexts allows for better organization and maintainable code base.

4. Lack of Fine-Grain UI Control

GWT provides a wide array of prebuilt controls in order to assemble a UI. However, creating customized UI components is difficult. Creating UI components from scratch is cost prohibitive.

Anticipate potential problems the GWT platform could have in your specific enterprise. For example, one banking client wanted a new UI for a special application. We analyzed their technical environment, the nature of the application itself, and determined that GWT offered no real performance benefits and there were other platforms with less risk.

How to Migrate Google Web Toolkit applications to a Modern JS Framework

1. Take Inventory

To start, partner with the right front-end development team to help you migrate platforms effectively. Identify UI components and Controller components in your current code base. Since the standard architecture is generally tightly coupled between the UI and the business logic controller, the delineation of where the UI ends and the controller starts can be fuzzy.

Work with a development team

Work with a development team to migrate platforms effectively.

2. Ensure API Enablement

API enable business logic controllers using RESTful services. Once the components have been inventoried, look into encapsulating and creating a clear delineation between the UI and the controllers. This way, the architecture will enable a componentized model and will help accelerate API enabling the business logic. If you are currently using GWT RPC or JSON over HTTP within the application, some refactoring will have to occur.

3. Set up GWT RPC Capabilities

GWT RPC allows for the passing of Java objects between the client side code and the business logic code. This pattern is similar to what is seen in popular frameworks such as Jersey and Spring. If the application leverages this pattern, it would be prudent to implement one of these two frameworks. These frameworks will convert your Java objects to JSON.

4. Enable a JSON over HTTP pattern

This pattern requires the developer to manually create the JSON using Java Strings. It is still recommended to leverage a framework like Jersey or Spring to reduce development time. Since the JSON string is built up manually, it is very prone to errors and will be very cumbersome to maintain.

Once the controllers are componentized, the quick release can be to leverage a framework to API enable the code and expose that functionality as a RESTful endpoint. If time permits, it’s advisable to see where code reuse can be implemented to create generic functions that can serve multiple portions of your application.

5. Pick your new design and JavaScript framework

Now that you’ve churned the ocean with your code base, it’s a good time to think about using good UX practices and methodologies to create a new version of your application that can leverage the more modern frameworks. A resulting benefit is that access to front-end developers will become easier and retention of those resources will be high.

Once a UI and visual design effort are under way, the right JavaScript framework(s) can be selected to create a rich user experience.

Code away.

Conclusion

Google Web Toolkit applications are outdated, operate too slowly, and present significant roadblocks for building a responsive UI. Seasoned developers have already seen a shift in skills trending toward working in platforms such as HTML5 and Node.js. High-profile companies are choosing the option to code in these up-to-date frameworks, taking advantage of increased platform performance, flexibility and development efficiencies.

Migrate platforms with our Enterprise Re-Platforming Solutions.

Considering migrating from Adobe Flex? Use our 5-Step Migration Assessment Framework to get started.

Interested in partnering with us?

Send a message and we will work with you to understand your needs.

UX360 - Enterprise Journey Mapping Platform

Power Platform

UX360 - Enterprise Journey Mapping Platform
Related Insights

2017-08-07T16:20:40+00:00