SlideShare a Scribd company logo
Building Ajax Applications  with the Google Web Toolkit Vivek Prahlad
Agenda What is the Google Web Toolkit? Features Architectural issues with AJAX applications And how the GWT handles them Experience report:  What went well? Gotchas Lots of demos
What is the GWT? A UI framework for building Ajax apps in Java Best suited for one page Ajax apps Can be embedded into existing apps as well Open Source (Apache 2 license) Component based programming model Similar to, but simpler than Swing / SWT Control application appearance via CSS Simple RPC framework
Source: Adaptive Path How are Ajax apps different?
Source: Adaptive Path
Source: Adaptive Path
Demo: Hello World
Developing applications Client side code: Java + GWT UI library Restriction: subset of the JDK – java.lang, java.util Compiled to javascript. Morfik, Script# are similar Server side code: GWT RPC + usual suspects Spring & Hibernate Can send domain layer classes over the wire Need to implement  IsSerializable Compiled to bytecode as usual
Features Component based framework Browser support: IE6+, Firefox, Mozilla, Safari, Opera No Konqueror support Internationalization Debugging Browser history management Integrate with javascript libraries via JSNI JUnit integration
Demo: More Examples
Architectural Issues? Back button support? Handled by the browser Session state? All on the client, not a server issue UI event handling? All on the client, no round trip Deployment? Compiled Javascript code, java on server side
Answers to a few Ajax headaches History? Handled by the History class Cross browser support? Abstract DOM class RPC? Java based RPC mechanism
Building Widgets Build new widgets from existing ones Style with CSS No, your app doesn't  have  to look like Gmail! Layout with panels
Testing Sahi ( http://sahi.co.in ) for functional testing Unit testing via the  GWTTestCase Same restrictions as with UI code MVC is your friend Use GWTTestcase for the view Test the Model and Controller as usual
What went well? Truly cross-browser App needed 2 lines of custom javascript For disabling text selection Great component model Easy to build custom components from scratch Java to Javascript compiler works like a charm No memory leaks Break up large apps with modules & IFrames
Gotchas RPC mechanism works only with GWT clients Some widgets use HTML tables internally CSS for layout faster, but more challenging Table widget support weak No MVC separation
Gotchas Need to be careful about client side state Ajax apps usually long lived – memory leaks can kill you Some widgets need a lot of custom HTML Tree widget biggest offender Need to replace hibernated objects before serializing Replace PersistentSet, PersistentList with HashSet, ArrayList
Resources http://code.google.com/webtoolkit http://groups.google.com/Google-Web-Toolkit http://www.adaptivepath.com/publications/essays/archives/000385.php
Questions?

More Related Content

What's hot (20)

PDF
Wso2 product release webinar introducing jaggery
WSO2
 
ODP
Automated UI testing. Selenium. DrupalCamp Kyiv 2011
Yuriy Gerasimov
 
PPTX
Selenium
傑倫 鍾
 
PDF
Web UI test automation instruments
Artem Nagornyi
 
PDF
What's new in selenium 4
Knoldus Inc.
 
PDF
Difference between asp.net mvc 3 and asp.net mvc 4
Umar Ali
 
PDF
Create an architecture for web test automation
Elias Nogueira
 
PDF
Wakanda - apps.berlin.js - 2012-11-29
Alexandre Morgaut
 
PDF
Closure Library: Build Complex JavaScript Applications
devbilt
 
PDF
"The Story of Declarative React at Grammarly: From two-way data binding with ...
Fwdays
 
PDF
Difference between asp.net web forms and asp.net mvc
Umar Ali
 
PPT
Web Test Automation with Selenium
vivek_prahlad
 
PPTX
Selenium Web Driver Tutorial for Cross Browser Testing
Sarah Elson
 
PPTX
Automated Testing using JavaScript
Simon Guest
 
PDF
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
COMAQA.BY
 
PDF
Difference between asp.net web api and asp.net mvc
Umar Ali
 
PDF
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
WebStackAcademy
 
PPTX
Architecture & Workflow of Modern Web Apps
Rasheed Waraich
 
PPTX
Flask
Elita Lobo
 
PDF
Difference between wcf and asp.net web api
Umar Ali
 
Wso2 product release webinar introducing jaggery
WSO2
 
Automated UI testing. Selenium. DrupalCamp Kyiv 2011
Yuriy Gerasimov
 
Selenium
傑倫 鍾
 
Web UI test automation instruments
Artem Nagornyi
 
What's new in selenium 4
Knoldus Inc.
 
Difference between asp.net mvc 3 and asp.net mvc 4
Umar Ali
 
Create an architecture for web test automation
Elias Nogueira
 
Wakanda - apps.berlin.js - 2012-11-29
Alexandre Morgaut
 
Closure Library: Build Complex JavaScript Applications
devbilt
 
"The Story of Declarative React at Grammarly: From two-way data binding with ...
Fwdays
 
Difference between asp.net web forms and asp.net mvc
Umar Ali
 
Web Test Automation with Selenium
vivek_prahlad
 
Selenium Web Driver Tutorial for Cross Browser Testing
Sarah Elson
 
Automated Testing using JavaScript
Simon Guest
 
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
COMAQA.BY
 
Difference between asp.net web api and asp.net mvc
Umar Ali
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
WebStackAcademy
 
Architecture & Workflow of Modern Web Apps
Rasheed Waraich
 
Flask
Elita Lobo
 
Difference between wcf and asp.net web api
Umar Ali
 

Viewers also liked (6)

PPTX
Ajax:From Desktop Applications towards Ajax Web Applications
Siva Kumar
 
PPTX
Ajax
Tech_MX
 
PPT
Introduction to CSS
Amit Tyagi
 
PDF
Mobile Browser Internal (Blink Rendering Engine)
Hyungwook Lee
 
PPT
Introduction to HTML
MayaLisa
 
PPT
Introduction to html
vikasgaur31
 
Ajax:From Desktop Applications towards Ajax Web Applications
Siva Kumar
 
Ajax
Tech_MX
 
Introduction to CSS
Amit Tyagi
 
Mobile Browser Internal (Blink Rendering Engine)
Hyungwook Lee
 
Introduction to HTML
MayaLisa
 
Introduction to html
vikasgaur31
 
Ad

Similar to Building Ajax apps with the Google Web Toolkit (20)

PPT
Google Web Toolkit Introduction - eXo Platform SEA
nerazz08
 
PPTX
GWT = easy AJAX
Olivier Gérardin
 
PPT
GWT
Lorraine JUG
 
PDF
GWT - Building Rich Internet Applications Using OO Tools
barciszewski
 
PPT
GWT Training - Session 1/3
Faiz Bashir
 
PPT
Introduction to Google Web Toolkit
Didier Girard
 
PPT
GWT is Smarter Than You
Robert Cooper
 
PPTX
Gwt overview & getting started
Binh Bui
 
PPT
Gwt Presentation1
rajakumar.tu
 
PPTX
Gwt session
Ahmed Akl
 
PPTX
Gwt session
Mans Jug
 
PDF
GWT training session 1
SNEHAL MASNE
 
PPT
Google Dev Day2007
lucclaes
 
PPT
Google Web Toolkit
Michael Angelo Rivera
 
PPTX
Google web toolkit ( Gwt )
Pankaj Bhasker
 
PDF
Introduction to Google Web Toolkit - part 1
Muhammad Ghazali
 
PPT
Gwt training presentation
MUFIX Community
 
PPT
Google Web Toolkits
Yiguang Hu
 
PDF
Rich Internet Web Application Development using Google Web Toolkit
IJERA Editor
 
Google Web Toolkit Introduction - eXo Platform SEA
nerazz08
 
GWT = easy AJAX
Olivier Gérardin
 
GWT - Building Rich Internet Applications Using OO Tools
barciszewski
 
GWT Training - Session 1/3
Faiz Bashir
 
Introduction to Google Web Toolkit
Didier Girard
 
GWT is Smarter Than You
Robert Cooper
 
Gwt overview & getting started
Binh Bui
 
Gwt Presentation1
rajakumar.tu
 
Gwt session
Ahmed Akl
 
Gwt session
Mans Jug
 
GWT training session 1
SNEHAL MASNE
 
Google Dev Day2007
lucclaes
 
Google Web Toolkit
Michael Angelo Rivera
 
Google web toolkit ( Gwt )
Pankaj Bhasker
 
Introduction to Google Web Toolkit - part 1
Muhammad Ghazali
 
Gwt training presentation
MUFIX Community
 
Google Web Toolkits
Yiguang Hu
 
Rich Internet Web Application Development using Google Web Toolkit
IJERA Editor
 
Ad

Recently uploaded (20)

PPTX
Micro Battery Market Size & Share | Growth - 2034
Aman Bansal
 
PPTX
Revolutionizing Retail: The Impact of Artificial Intelligence
RUPAL AGARWAL
 
PDF
The Complete Guide to SME IPO in 2025.pdf
India IPO
 
PPTX
Hackathon - Technology - Idea Submission Template -HackerEarth.pptx
nanster236
 
PDF
FastnersFastnersFastnersFastnersFastners
mizhanw168
 
PDF
Agriculture Machinery PartsAgriculture Machinery Parts
mizhanw168
 
PDF
How do we fix the Messed Up Corporation’s System diagram?
YukoSoma
 
PDF
NewBase 03 July 2025 Energy News issue - 1799 by Khaled Al Awadi_compressed.pdf
Khaled Al Awadi
 
PDF
Gabino Barbosa - A Master Of Efficiency
Gabino Barbosa
 
PPTX
Asia Pacific Tropical Fruit Puree Market Overview & Growth
chanderdeepseoexpert
 
PDF
Top 10 Emerging Tech Trends to Watch in 2025.pdf
marketingyourtechdig
 
PDF
Buy Facebook Accounts Buy Facebook Accounts
darlaknowles49
 
PDF
LDM Recording for Yogi Goddess Projects Summer 2025
LDMMia GrandMaster
 
PPTX
25 Future Mega Trends Reshaping the World in 2025 and Beyond
presentifyai
 
PPTX
World First Cardiovascular & Thoracic CT Scanner
arineta37
 
PDF
_How Freshers Can Find the Best IT Companies in Jaipur with Salarite.pdf
SALARITE
 
DOCX
How to Build Digital Income From Scratch Without Tech Skills or Experience
legendarybook73
 
PDF
Top Supply Chain Management Tools Transforming Global Logistics.pdf
Enterprise Wired
 
PPTX
Smarter call Reporting with Callation.pptx
Callation us
 
PDF
BeMetals_Presentation_July_2025 .pdf
DerekIwanaka2
 
Micro Battery Market Size & Share | Growth - 2034
Aman Bansal
 
Revolutionizing Retail: The Impact of Artificial Intelligence
RUPAL AGARWAL
 
The Complete Guide to SME IPO in 2025.pdf
India IPO
 
Hackathon - Technology - Idea Submission Template -HackerEarth.pptx
nanster236
 
FastnersFastnersFastnersFastnersFastners
mizhanw168
 
Agriculture Machinery PartsAgriculture Machinery Parts
mizhanw168
 
How do we fix the Messed Up Corporation’s System diagram?
YukoSoma
 
NewBase 03 July 2025 Energy News issue - 1799 by Khaled Al Awadi_compressed.pdf
Khaled Al Awadi
 
Gabino Barbosa - A Master Of Efficiency
Gabino Barbosa
 
Asia Pacific Tropical Fruit Puree Market Overview & Growth
chanderdeepseoexpert
 
Top 10 Emerging Tech Trends to Watch in 2025.pdf
marketingyourtechdig
 
Buy Facebook Accounts Buy Facebook Accounts
darlaknowles49
 
LDM Recording for Yogi Goddess Projects Summer 2025
LDMMia GrandMaster
 
25 Future Mega Trends Reshaping the World in 2025 and Beyond
presentifyai
 
World First Cardiovascular & Thoracic CT Scanner
arineta37
 
_How Freshers Can Find the Best IT Companies in Jaipur with Salarite.pdf
SALARITE
 
How to Build Digital Income From Scratch Without Tech Skills or Experience
legendarybook73
 
Top Supply Chain Management Tools Transforming Global Logistics.pdf
Enterprise Wired
 
Smarter call Reporting with Callation.pptx
Callation us
 
BeMetals_Presentation_July_2025 .pdf
DerekIwanaka2
 

Building Ajax apps with the Google Web Toolkit

  • 1. Building Ajax Applications with the Google Web Toolkit Vivek Prahlad
  • 2. Agenda What is the Google Web Toolkit? Features Architectural issues with AJAX applications And how the GWT handles them Experience report: What went well? Gotchas Lots of demos
  • 3. What is the GWT? A UI framework for building Ajax apps in Java Best suited for one page Ajax apps Can be embedded into existing apps as well Open Source (Apache 2 license) Component based programming model Similar to, but simpler than Swing / SWT Control application appearance via CSS Simple RPC framework
  • 4. Source: Adaptive Path How are Ajax apps different?
  • 8. Developing applications Client side code: Java + GWT UI library Restriction: subset of the JDK – java.lang, java.util Compiled to javascript. Morfik, Script# are similar Server side code: GWT RPC + usual suspects Spring & Hibernate Can send domain layer classes over the wire Need to implement IsSerializable Compiled to bytecode as usual
  • 9. Features Component based framework Browser support: IE6+, Firefox, Mozilla, Safari, Opera No Konqueror support Internationalization Debugging Browser history management Integrate with javascript libraries via JSNI JUnit integration
  • 11. Architectural Issues? Back button support? Handled by the browser Session state? All on the client, not a server issue UI event handling? All on the client, no round trip Deployment? Compiled Javascript code, java on server side
  • 12. Answers to a few Ajax headaches History? Handled by the History class Cross browser support? Abstract DOM class RPC? Java based RPC mechanism
  • 13. Building Widgets Build new widgets from existing ones Style with CSS No, your app doesn't have to look like Gmail! Layout with panels
  • 14. Testing Sahi ( http://sahi.co.in ) for functional testing Unit testing via the GWTTestCase Same restrictions as with UI code MVC is your friend Use GWTTestcase for the view Test the Model and Controller as usual
  • 15. What went well? Truly cross-browser App needed 2 lines of custom javascript For disabling text selection Great component model Easy to build custom components from scratch Java to Javascript compiler works like a charm No memory leaks Break up large apps with modules & IFrames
  • 16. Gotchas RPC mechanism works only with GWT clients Some widgets use HTML tables internally CSS for layout faster, but more challenging Table widget support weak No MVC separation
  • 17. Gotchas Need to be careful about client side state Ajax apps usually long lived – memory leaks can kill you Some widgets need a lot of custom HTML Tree widget biggest offender Need to replace hibernated objects before serializing Replace PersistentSet, PersistentList with HashSet, ArrayList