SlideShare a Scribd company logo
Agile AJAX:
  The Google Web Toolkit
       Experience

Paul Infield-Harm                                  Daniel Wellman
 paul@infield-harm.org                             dan@danielwellman.com
 www.infield-harm.org                               blog.danielwellman.com


                        www.cyrusinnovation.com
                         New York • Boston
What is
Google Web Toolkit ?
Java
Java to JavaScript
           compiler

.java                   .js     .js
  .java
   .java     Compiler
    .java
     .java
                        .js     .js


Java                    JavaScript
Why?
“...because there already are so many
great tools out there, not to mention
       scads of books, articles,
    libraries, and expertise.”
                        - The GWT Team
Demo
A Taste of GWT

• Application, Java source, generated js
• Exploratory dev in hosted mode
• Making a change, test-first
A Taste of GWT

• Application, Java source, generated js
• Exploratory dev in hosted mode
• Making a change, test-first
A Taste of GWT

• Application, Java source, generated js
• Exploratory dev in hosted mode
• Making a change, test-first
A Taste of GWT

• Application, Java source, generated js
• Exploratory dev in hosted mode
• Making a change, test-first
Application, Java
source, generated JS
Exploratory dev in
  hosted mode
Making a change, test-
        first
JSNI
                     photo by clothfairy
       http://www.flickr.com/photos/clothfairy/ CC BY 2.0
GWT and
Agile
Development
Practices
Agile Development
     Practices
  • Refactoring
  • Performance Optimization
  • Test-Driven Development
  • Collective Code Ownership
  • Continuous Integration
Refactoring
Wrap Return Value
                                                           Invert Boolean
                                                             Safe Delete
                                                      Move Instance Method
                                                           Inline Constant
                                                          Extract Subclass
                                                 Replace Method Code Duplicates
                                                   Convert To Instance Method
                                                                Rename
                                                 Move Inner Class to Upper Level
                                                     Change Method Signature
                                                        Make Method Static
                                                         Copy/Clone Class
                                                           Extract Method
                                                         Introduce Variable
                                                           Introduce Field
                                                        Introduce Constant
                                                       Introduce Parameter
                                                          Extract Interface       Inl
                                                                                      ine
        Safe Delete                                      Extract Superclass               Su




                                                                                  Intr
                                                                                            pe
                                                   Use Interface Where Possible                rcl




                                                                                      odu
                                                                                                   ass




                                             n
          Rename




                                       dle ct
                                          ma
                                                          Pull Members Up




                                    Mid je




                                                                                         ce
                                  ve Ob
                                                       Push Members Down




                                                                                        Par
     Move/Copy File                             Replace Inheritance with Delegation




                               mo d




                                                                                          am
                            Re etho
                                                        Inline Local Variable




                                                                                             e
    Introduce Variable




                                                                                              ter
                                M
                                                            Inline Method
                                              n
                            act




                                                                                               Ob
                                            io Convert Anonymous Class to Inner
                                        rat




                                                                                        Ex
                             tr
      Introduce Field                 g




                                                                                                 jec
                                   Mi




                                                                                          tra
                          Ex
                                                         Encapsulate Fields
                                 e




                                                                                                    t
                                                                                              ct
                               p                    Replace Temp With Query
                            Ty




                                                                                               Cl
   Introduce Constant




                                                                                                 as
                                            Replace Constructor With Factory Method




                                                                                                    s
JavaScript Refactorings                  Java Refactorings
Typical Java Web Template

 <div>
 	 <span>${title}</span>
 	 <a href="..."><img src="..."/></a>
 	 <a href="..."><img src="..."/></a>
 </div>
GWT Layout
label = new Label(title);
panel.add(label);

upButton = new Image("...");
panel.add(upButton);
	 	
removeButton = new Image("...");
panel.add(removeButton);
Refactored GWT


 new BookPanel(title);
Performance
Optimization
Better
“



    JavaScript code than
        you would write
          by hand            ”

                    - “Making GWT Better”
                      on GWT Project Page


                             photo by clothfairy
Optimizing
Compiler
             photo by ralphbijker
Name That Compile!
class
Calculator
{




public
int
add(int
x,
int
y)
{






return
x
+
y;




}
}

Calculator
myCalc
=
new
Calculator();
Window.alert((myCalc.add(3,
2));
Compiles To:


   alert(5)
Whole-Program
 Optimization
Whole-Program
        Optimization


               Compiler




Java Library              JavaScript
... but no reflection.



          X
 employee.set("firstName", "Fred");
photo by Alicia Solario




Simple Design
Test-Driven
Development
JUnit
TestNG



Concordion           Fit
Three ways to test
Plain JUnit
@Test
public
void
additionsGoToTopOfList()
{
  startingWithTitles("First added");

    model.addTitle("Second added");
    assertThat(model.getTitles().get(0),
               is("Second added"));
}
In a Real Browser
In the Hosted Mode
      Browser


 GWTTestCase
How do you test UI?
Model-View-Presenter
         View



       Presenter



        Model
photo by sanja gjenero




Collective Code
  Ownership
Same Code on
Browser and Server




        Java
       Object
Developers




Front End
                     Server Developers
Developers
Code-based UI Layout
 HorizontalPanel panel = new HorizontalPanel();
 panel.add(new TextBox());
 panel.add(new Button(...));
 panel.add(new Image(...);
:-)
Developers                        :-(
                                   UI Designers
Cross-browser CSS
        is still hard
Continuous
Integration




              photo by wilhei
Build Tools
Build Servers




           Hudson
Static Analysis
& Code Quality Tools




              Checkstyle
Image by Svilen Mushkatov




  When
  should you
  use GWT?
photo by Boby Dimitrov
Is this a web site
or a web application?




 Web site      Web application
photo by Vidiot
JUnit

   TestNG


                     Checkstyle
Concordion     Fit
Questions?
     Source code for the demo available on github:
http://github.com/pinfieldharm/Agile-2009-GWT-Demo

                  References and Resources:
                  http://tinyurl.com/agilegwt

Paul Infield-Harm                                  Daniel Wellman
 paul@infield-harm.org                             dan@danielwellman.com
 www.infield-harm.org                               blog.danielwellman.com


                        www.cyrusinnovation.com
                         New York • Boston

More Related Content

Similar to The Google Web Toolkit Experience

[A3]deview 2012 network binder
[A3]deview 2012 network binder[A3]deview 2012 network binder
[A3]deview 2012 network binderNAVER D2
 
[NHN] 성공적인 소셜게임 런칭과 기술
[NHN] 성공적인 소셜게임 런칭과 기술[NHN] 성공적인 소셜게임 런칭과 기술
[NHN] 성공적인 소셜게임 런칭과 기술
GAMENEXT Works
 
DejaVOO: A Regression Testing Tool for Java Software
DejaVOO: A Regression Testing Tool for Java SoftwareDejaVOO: A Regression Testing Tool for Java Software
DejaVOO: A Regression Testing Tool for Java SoftwareManas Tungare
 
Java Modifiers Matrix
Java Modifiers MatrixJava Modifiers Matrix
Java Modifiers Matrix
Yasser Ibrahim
 
2008 Sccc Inheritance
2008 Sccc Inheritance2008 Sccc Inheritance
2008 Sccc Inheritance
bergel
 
The DEVS-Driven Modeling Language: Syntax and Semantics Definition by Meta-Mo...
The DEVS-Driven Modeling Language: Syntax and Semantics Definition by Meta-Mo...The DEVS-Driven Modeling Language: Syntax and Semantics Definition by Meta-Mo...
The DEVS-Driven Modeling Language: Syntax and Semantics Definition by Meta-Mo...
Daniele Gianni
 
Why Doesn't Java Has Instant Turnaround - Con-FESS 2012
Why Doesn't Java Has Instant Turnaround - Con-FESS 2012Why Doesn't Java Has Instant Turnaround - Con-FESS 2012
Why Doesn't Java Has Instant Turnaround - Con-FESS 2012Anton Arhipov
 
Java Reference
Java ReferenceJava Reference
Java Referencekhoj4u
 
RIA Patterns - Best Practices for Common Patterns of Rich Interaction
RIA Patterns - Best Practices for Common Patterns of Rich InteractionRIA Patterns - Best Practices for Common Patterns of Rich Interaction
RIA Patterns - Best Practices for Common Patterns of Rich Interaction
interactionpatterns.org
 
Apache Wicket: Web Applications With Just Java
Apache Wicket: Web Applications With Just JavaApache Wicket: Web Applications With Just Java
Apache Wicket: Web Applications With Just Java
Martijn Dashorst
 
持续交付 - 使用云计算和虚拟化技术
持续交付 - 使用云计算和虚拟化技术持续交付 - 使用云计算和虚拟化技术
持续交付 - 使用云计算和虚拟化技术
foxgem
 

Similar to The Google Web Toolkit Experience (11)

[A3]deview 2012 network binder
[A3]deview 2012 network binder[A3]deview 2012 network binder
[A3]deview 2012 network binder
 
[NHN] 성공적인 소셜게임 런칭과 기술
[NHN] 성공적인 소셜게임 런칭과 기술[NHN] 성공적인 소셜게임 런칭과 기술
[NHN] 성공적인 소셜게임 런칭과 기술
 
DejaVOO: A Regression Testing Tool for Java Software
DejaVOO: A Regression Testing Tool for Java SoftwareDejaVOO: A Regression Testing Tool for Java Software
DejaVOO: A Regression Testing Tool for Java Software
 
Java Modifiers Matrix
Java Modifiers MatrixJava Modifiers Matrix
Java Modifiers Matrix
 
2008 Sccc Inheritance
2008 Sccc Inheritance2008 Sccc Inheritance
2008 Sccc Inheritance
 
The DEVS-Driven Modeling Language: Syntax and Semantics Definition by Meta-Mo...
The DEVS-Driven Modeling Language: Syntax and Semantics Definition by Meta-Mo...The DEVS-Driven Modeling Language: Syntax and Semantics Definition by Meta-Mo...
The DEVS-Driven Modeling Language: Syntax and Semantics Definition by Meta-Mo...
 
Why Doesn't Java Has Instant Turnaround - Con-FESS 2012
Why Doesn't Java Has Instant Turnaround - Con-FESS 2012Why Doesn't Java Has Instant Turnaround - Con-FESS 2012
Why Doesn't Java Has Instant Turnaround - Con-FESS 2012
 
Java Reference
Java ReferenceJava Reference
Java Reference
 
RIA Patterns - Best Practices for Common Patterns of Rich Interaction
RIA Patterns - Best Practices for Common Patterns of Rich InteractionRIA Patterns - Best Practices for Common Patterns of Rich Interaction
RIA Patterns - Best Practices for Common Patterns of Rich Interaction
 
Apache Wicket: Web Applications With Just Java
Apache Wicket: Web Applications With Just JavaApache Wicket: Web Applications With Just Java
Apache Wicket: Web Applications With Just Java
 
持续交付 - 使用云计算和虚拟化技术
持续交付 - 使用云计算和虚拟化技术持续交付 - 使用云计算和虚拟化技术
持续交付 - 使用云计算和虚拟化技术
 

Recently uploaded

Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
Pixlogix Infotech
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Zilliz
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 

Recently uploaded (20)

Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 

The Google Web Toolkit Experience