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
How to Split Your System into Microservices
Eberhard Wolff
 
PDF
Microservices in Java
Anatole Tresch
 
PDF
Deploying asp.net and mvc applications to azure
Glyn Darkin
 
PPT
sMash_for_zOS-users
Otto Kee LeakPeng
 
PPTX
Building multi tenancy enterprise applications - quick
uEngine Solutions
 
PPTX
Micro service architecture
uEngine Solutions
 
PPTX
REST and Microservices
Shaun Abram
 
PPTX
Php Framework
cncwebworld
 
PPT
O'Reilly ETech Conference: Laszlo RIA
Oliver Steele
 
PPTX
Azure Key Vault with a PaaS Architecture and ARM Template Deployment
Roy Kim
 
DOC
Suresh Resume
Suresh K N V
 
PDF
Arpit Joshi Resume
Arpit Joshi
 
PPTX
DevOps on GCP Course Compared to AWS
Joseph Holbrook, Chief Learning Officer (CLO)
 
PPSX
Intorduction to struts
Anup72
 
PDF
THEFT-PROOF JAVA EE - SECURING YOUR JAVA EE APPLICATIONS
Markus Eisele
 
PPTX
Vijay Mix Presentation
vijayrvr
 
PDF
Using patterns and pattern languages to make better architectural decisions
Chris Richardson
 
PDF
Decomposing applications for deployability and scalability(SpringSource webinar)
Chris Richardson
 
PDF
Decomposing applications for deployability and scalability #springone2gx #s12gx
Chris Richardson
 
PPTX
Struts & hibernate ppt
Pankaj Patel
 
How to Split Your System into Microservices
Eberhard Wolff
 
Microservices in Java
Anatole Tresch
 
Deploying asp.net and mvc applications to azure
Glyn Darkin
 
sMash_for_zOS-users
Otto Kee LeakPeng
 
Building multi tenancy enterprise applications - quick
uEngine Solutions
 
Micro service architecture
uEngine Solutions
 
REST and Microservices
Shaun Abram
 
Php Framework
cncwebworld
 
O'Reilly ETech Conference: Laszlo RIA
Oliver Steele
 
Azure Key Vault with a PaaS Architecture and ARM Template Deployment
Roy Kim
 
Suresh Resume
Suresh K N V
 
Arpit Joshi Resume
Arpit Joshi
 
DevOps on GCP Course Compared to AWS
Joseph Holbrook, Chief Learning Officer (CLO)
 
Intorduction to struts
Anup72
 
THEFT-PROOF JAVA EE - SECURING YOUR JAVA EE APPLICATIONS
Markus Eisele
 
Vijay Mix Presentation
vijayrvr
 
Using patterns and pattern languages to make better architectural decisions
Chris Richardson
 
Decomposing applications for deployability and scalability(SpringSource webinar)
Chris Richardson
 
Decomposing applications for deployability and scalability #springone2gx #s12gx
Chris Richardson
 
Struts & hibernate ppt
Pankaj Patel
 

Similar to 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

More from Priyank Kapadia (15)

ODP
Ubuntu, Canonical and the release of Feisty
Priyank Kapadia
 
PDF
OLPC and INDIA
Priyank Kapadia
 
PDF
Open Source - Hip not Hype
Priyank Kapadia
 
ODP
How to start an Open Source Project
Priyank Kapadia
 
ODP
Developing Multilingual Applications
Priyank Kapadia
 
PDF
Open Solaris
Priyank Kapadia
 
ODP
How to build Debian packages
Priyank Kapadia
 
ODP
AMANDA
Priyank Kapadia
 
PDF
ASTERISK - Open Source PBS
Priyank Kapadia
 
ODP
C Types - Extending Python
Priyank Kapadia
 
ODP
Applying Security Algorithms Using openSSL crypto library
Priyank Kapadia
 
PDF
Authentication Modules For Linux - PAM Architecture
Priyank Kapadia
 
PPT
Debugging Applications with GNU Debugger
Priyank Kapadia
 
PPT
Storage Management using LVM
Priyank Kapadia
 
PPT
Linux Kernel Development
Priyank Kapadia
 
Ubuntu, Canonical and the release of Feisty
Priyank Kapadia
 
OLPC and INDIA
Priyank Kapadia
 
Open Source - Hip not Hype
Priyank Kapadia
 
How to start an Open Source Project
Priyank Kapadia
 
Developing Multilingual Applications
Priyank Kapadia
 
Open Solaris
Priyank Kapadia
 
How to build Debian packages
Priyank Kapadia
 
ASTERISK - Open Source PBS
Priyank Kapadia
 
C Types - Extending Python
Priyank Kapadia
 
Applying Security Algorithms Using openSSL crypto library
Priyank Kapadia
 
Authentication Modules For Linux - PAM Architecture
Priyank Kapadia
 
Debugging Applications with GNU Debugger
Priyank Kapadia
 
Storage Management using LVM
Priyank Kapadia
 
Linux Kernel Development
Priyank Kapadia
 
Ad

Recently uploaded (20)

DOCX
Top Digital Marketing Services Company | Fusion Digitech
ketulraval6
 
PPTX
Appreciations - June 25.pptxggggggghhhhhh
anushavnayak
 
PDF
MusicVideoTreatmentForFreebyParrisLaVon.pdf
gamilton
 
PDF
Summary of Comments on Writing the House, Parts I & II.pdf
Brij Consulting, LLC
 
PDF
Intro ISO 56001: Innovation Management System
Michael Lee
 
PPTX
Jessica Garza: At the Intersection of Technology and Humanity
Jessica Garza
 
PDF
Thane Stenner - A Leader In Extreme Wealth Management
Thane Stenner
 
PPTX
Baby Solids Food Schedule - Introducing Solids at 5 Months.pptx
Sanchita Daswani
 
PDF
GIÁO TRÌNH KINH DOANH QUỐC TẾ ĐẠI HỌC NGOẠI THƯƠNG
k622314115078
 
PDF
Your Best Year Yet Create a Sharp, Focused AOP for FY2026
ChristopherVicGamuya
 
PPT
How Cybersecurity Training Can Protect Your Business from Costly Threats
Sam Vohra
 
PPTX
Black life TeleHealth 3 (1).pptx Business Plan
mdthelackyboy
 
PPTX
business and preparing for good business
jaslehannvillaflor
 
PDF
Walt Disney Business Proposal for Hollywood Studios
balazscsillag
 
PDF
How is IMSLP Wagner Connected with Pachelbel & Shostakovich.pdf
SheetMusic International
 
PDF
Books on Display in the Library June 2025 - Matariki
NZSG
 
PDF
Top 25 FinOps Tools to Watch in 2025.pdf
Amnic
 
PPTX
Manuscript and Types of Headings used in EDPM.pptx
RosanHaye1
 
PDF
Maksym Vyshnivetskyi: Управління якістю (UA)
Lviv Startup Club
 
PDF
What Are the Structure and Benefits of New Tax Form 12BAA?
SAG Infotech
 
Top Digital Marketing Services Company | Fusion Digitech
ketulraval6
 
Appreciations - June 25.pptxggggggghhhhhh
anushavnayak
 
MusicVideoTreatmentForFreebyParrisLaVon.pdf
gamilton
 
Summary of Comments on Writing the House, Parts I & II.pdf
Brij Consulting, LLC
 
Intro ISO 56001: Innovation Management System
Michael Lee
 
Jessica Garza: At the Intersection of Technology and Humanity
Jessica Garza
 
Thane Stenner - A Leader In Extreme Wealth Management
Thane Stenner
 
Baby Solids Food Schedule - Introducing Solids at 5 Months.pptx
Sanchita Daswani
 
GIÁO TRÌNH KINH DOANH QUỐC TẾ ĐẠI HỌC NGOẠI THƯƠNG
k622314115078
 
Your Best Year Yet Create a Sharp, Focused AOP for FY2026
ChristopherVicGamuya
 
How Cybersecurity Training Can Protect Your Business from Costly Threats
Sam Vohra
 
Black life TeleHealth 3 (1).pptx Business Plan
mdthelackyboy
 
business and preparing for good business
jaslehannvillaflor
 
Walt Disney Business Proposal for Hollywood Studios
balazscsillag
 
How is IMSLP Wagner Connected with Pachelbel & Shostakovich.pdf
SheetMusic International
 
Books on Display in the Library June 2025 - Matariki
NZSG
 
Top 25 FinOps Tools to Watch in 2025.pdf
Amnic
 
Manuscript and Types of Headings used in EDPM.pptx
RosanHaye1
 
Maksym Vyshnivetskyi: Управління якістю (UA)
Lviv Startup Club
 
What Are the Structure and Benefits of New Tax Form 12BAA?
SAG Infotech
 

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
  • 18. Resources http://code.google.com/webtoolkit http://groups.google.com/Google-Web-Toolkit http://www.adaptivepath.com/publications/essays/archives/000385.php