SlideShare a Scribd company logo
1 of 22
The Google Web Toolkit (GWT)
Overview & Getting Started
buithaibinh@gmail.com
2014/5
1
Topics in This Section
๏ What GWT is all about
• Why(Love Story :D)
• Advantages
• Disadvantages
๏ Installing GWT
• Core GWT
• Eclipse plugin
• Browser plugin
๏ Making a project
• Using Eclipse plugin
๏ Testing process
2
Why(Love Story :D)
3
Why Web Apps(MVC)?
• Downsides to browser-based apps
• GUI is poor
• HTML is OK for static documents, but lousy for programs
• Communication is inefficient
• HTTP is poor protocol for the way we now use Web apps
4
Why Web Apps(MVC)? (Continued)
• So why does everyone want Web apps?
• Universal access
• Everyone already has a browser installed
• Any computer on the network can access content
• Automatic “updates” (MVC)
• Content comes from server, so is never out of date
5
Why Ajax?
• Solve three key problems of Web apps
• Coarse-grained updates
• Synchronous: you are frozen while waiting for result
• Extremely limited options for widgets (GUI elements)
• Still browser based
• Ajax is about “what is the best you can do with what everyone already has in their browser?”
• “Real” browser-based active content
• Failed: Java Applets
• Not universally supported; can’t interact with the HTML
• Serious alternative: Flash/Flex
• Not preinstalled on all PCs; not available for iPhone/iPad
• Less proven
• Microsoft Silverlight
• JavaFX
6
Ajax Problems
• At least two languages are required
• JavaScript on the client
• Java or another language on the server
• Invoking server is cumbersome
• Even with JSON-RPC, DWR, or jQuery support
• Want more powerful RPC mechanism
• JavaScript scales poorly to large projects
• No strong typing
• Weak object hierarchies
• Many run-time errors instead of compile-time errors
• Incompatibility across platforms
• Can’t use preexisting Java libraries or utilities
7
Overview of the
Google Web Toolkit (GWT)
• Big Idea
• You write both client-side and server-side code in Java
• Client-side code
• Uses an API similar to Swing
• Most basic JDK 1.6 constructs and classes supported
• Gets compiled into JavaScript that runs in your browser
• Server-side code
• Client uses a callback API and specifies data source URL
• Once you define callback, you are mostly using regular Java method calls with complex arguments and return values
• Server extends special class and defines regular methods
• These are not servlet-style doBlah methods linked to HTTP
• Arguments and return values can b
• » Primitives, strings, arrays, a few java.util collections, Serializable custom classes
8
Sites that Use GWT
• Google Sites
• Apache Wave, Google Base,
• Google Checkout,
• Google Moderator
• Google Web
• Google AdSense
• Outside Sites
• phuongbook.com :D
9
Advantages of GWT
• No JavaScript syntax errors
• Use a reliable, strongly-typed language (Java) for development and debugging
• No JavaScript programming at all!
• Can use complex Java on the client
• Turned into JavaScript, but you still use String, array, Math class, ArrayList, HashMap,
custom classes, etc.
• Full IDE-based Java support for development and debugging
• Your client-side code can share data structures with your server-side code
10
Advantages of GWT (Continued)
• Can send complex Java types to/from the server
• Real Java objects gets serialized across network.
• More powerful and convenient approach than JSON-RPC
• Standalone test environment
• Can test within Eclipse without installing a new server
• Support by a major company
• Supported by the company that popularized Ajax in the first place
• Support won’t go away like perhaps with AjaxTags
11
Advantages of GWT (Continued)
• Faster Apps
• GWT uses deferred binding
• Sends exactly the right code for the user’s circumstances
• User agent
• Locale
• Debug vs. production
• Network characteristics
• Java is not compiled “blindly” into JavaScript
• Many advanced compiler design techniques are used to make everything faster
12
Disadvantages of GWT
• Nonstandard approach to HTML & JavaScript
• Programmatic creation of HTML can make use of standard HTML and
CSS tools more difficult.
• You never explicitly put JavaScript in your HTML.
• Very powerful in the long run; hard to get used to at first.
• Not search engine friendly
• Google and others won’t index the dynamic content
13
Disadvantages of GWT
(Continued)
• Only for Java developers
• Most Ajax environments do JavaScript on the client and have a choice for the server. GWT is
based entirely around Java.
• GWT does support “normal” Ajax requests, but if you didn’t plan to mostly use Java on server,
would you choose GWT in the first place?
• Can’t(hard) make use of the good features of JavaScript
• Fast prototyping, functional programming, easy DOM querying and manipulation (e.g., with
jQuery)
• Unusual approach
• Fundamentally different strategy than all other Ajax tools makes evaluation and management buyoff
harder
14
Installation and Setup
15
Installation: Overview
• Install Eclipse Plugin
• https://developers.google.com/eclipse/docs/getting_started
• Choose to install the GWT SDK at the same time
• Install Browser Plugin
• The first time you run in a browser in development mode, it will prompt you to install browser plugin.
• See details in section on running in Production Mode
• (Optional) Install GWT SDK
• https://developers.google.com/web-toolkit/download
• Download ZIP file and unzip into folder of your choice
• Optional because you can get it bundled with Eclipse plugin
• (Optional) Install Speed Tracer
• Performance profiler. See top-level download page from first bullet. Not discussed here.
16
Making a project - Demo
17
Testing Projects
18
Testing the Project in Development Mode
19
Testing Project in Production Mode
20
Deploying the Project to Normal Java App Server
21
Questions?
22

More Related Content

What's hot

Modern javascript
Modern javascriptModern javascript
Modern javascriptKevin Ball
 
Web application I have always dreamt of
Web application I have always dreamt ofWeb application I have always dreamt of
Web application I have always dreamt ofVictor_Cr
 
Saving Time By Testing With Jest
Saving Time By Testing With JestSaving Time By Testing With Jest
Saving Time By Testing With JestBen McCormick
 
Integration Testing with Selenium
Integration Testing with SeleniumIntegration Testing with Selenium
Integration Testing with SeleniumAll Things Open
 
How NOT to get lost in the current JavaScript landscape
How NOT to get lost in the current JavaScript landscapeHow NOT to get lost in the current JavaScript landscape
How NOT to get lost in the current JavaScript landscapeRadosław Scheibinger
 
Сергей Моренец: "Gradle. Write once, build everywhere"
Сергей Моренец: "Gradle. Write once, build everywhere"Сергей Моренец: "Gradle. Write once, build everywhere"
Сергей Моренец: "Gradle. Write once, build everywhere"Provectus
 
Jasmine - A BDD test framework for JavaScript
Jasmine - A BDD test framework for JavaScriptJasmine - A BDD test framework for JavaScript
Jasmine - A BDD test framework for JavaScriptSumanth krishna
 
CQ5 Development Setup, Maven Build and Deployment
CQ5 Development Setup, Maven Build and DeploymentCQ5 Development Setup, Maven Build and Deployment
CQ5 Development Setup, Maven Build and Deploymentklcodanr
 
Micronaut Deep Dive - Devnexus 2019
Micronaut Deep Dive - Devnexus 2019Micronaut Deep Dive - Devnexus 2019
Micronaut Deep Dive - Devnexus 2019graemerocher
 
Engage 2019: Modernising Your Domino and XPages Applications
Engage 2019: Modernising Your Domino and XPages Applications Engage 2019: Modernising Your Domino and XPages Applications
Engage 2019: Modernising Your Domino and XPages Applications Paul Withers
 
End to-end W3C - JS.everywhere(2012) Europe
End to-end W3C - JS.everywhere(2012) EuropeEnd to-end W3C - JS.everywhere(2012) Europe
End to-end W3C - JS.everywhere(2012) EuropeAlexandre Morgaut
 
Microservices: Yes or not?
Microservices: Yes or not?Microservices: Yes or not?
Microservices: Yes or not?Eduard Tomàs
 
Asp.net mvc 5 course module 1 overview
Asp.net mvc 5 course   module 1 overviewAsp.net mvc 5 course   module 1 overview
Asp.net mvc 5 course module 1 overviewSergey Seletsky
 
Full stack JavaScript - the folly of choice
Full stack JavaScript - the folly of choiceFull stack JavaScript - the folly of choice
Full stack JavaScript - the folly of choiceFDConf
 
Performance testing with VSTs on- and off-premises
Performance testing with VSTs on-  and off-premisesPerformance testing with VSTs on-  and off-premises
Performance testing with VSTs on- and off-premisesJeff Bramwell
 
ActiveMQ Performance Tuning
ActiveMQ Performance TuningActiveMQ Performance Tuning
ActiveMQ Performance TuningChristian Posta
 
La vita nella corsia di sorpasso; A tutta velocità, XPages!
La vita nella corsia di sorpasso; A tutta velocità, XPages!La vita nella corsia di sorpasso; A tutta velocità, XPages!
La vita nella corsia di sorpasso; A tutta velocità, XPages!Ulrich Krause
 

What's hot (20)

ITT Flisol 2013
ITT Flisol 2013ITT Flisol 2013
ITT Flisol 2013
 
Modern javascript
Modern javascriptModern javascript
Modern javascript
 
Web application I have always dreamt of
Web application I have always dreamt ofWeb application I have always dreamt of
Web application I have always dreamt of
 
Kickstart Jpa
Kickstart JpaKickstart Jpa
Kickstart Jpa
 
Saving Time By Testing With Jest
Saving Time By Testing With JestSaving Time By Testing With Jest
Saving Time By Testing With Jest
 
Integration Testing with Selenium
Integration Testing with SeleniumIntegration Testing with Selenium
Integration Testing with Selenium
 
How NOT to get lost in the current JavaScript landscape
How NOT to get lost in the current JavaScript landscapeHow NOT to get lost in the current JavaScript landscape
How NOT to get lost in the current JavaScript landscape
 
Сергей Моренец: "Gradle. Write once, build everywhere"
Сергей Моренец: "Gradle. Write once, build everywhere"Сергей Моренец: "Gradle. Write once, build everywhere"
Сергей Моренец: "Gradle. Write once, build everywhere"
 
Agile sites311training
Agile sites311trainingAgile sites311training
Agile sites311training
 
Jasmine - A BDD test framework for JavaScript
Jasmine - A BDD test framework for JavaScriptJasmine - A BDD test framework for JavaScript
Jasmine - A BDD test framework for JavaScript
 
CQ5 Development Setup, Maven Build and Deployment
CQ5 Development Setup, Maven Build and DeploymentCQ5 Development Setup, Maven Build and Deployment
CQ5 Development Setup, Maven Build and Deployment
 
Micronaut Deep Dive - Devnexus 2019
Micronaut Deep Dive - Devnexus 2019Micronaut Deep Dive - Devnexus 2019
Micronaut Deep Dive - Devnexus 2019
 
Engage 2019: Modernising Your Domino and XPages Applications
Engage 2019: Modernising Your Domino and XPages Applications Engage 2019: Modernising Your Domino and XPages Applications
Engage 2019: Modernising Your Domino and XPages Applications
 
End to-end W3C - JS.everywhere(2012) Europe
End to-end W3C - JS.everywhere(2012) EuropeEnd to-end W3C - JS.everywhere(2012) Europe
End to-end W3C - JS.everywhere(2012) Europe
 
Microservices: Yes or not?
Microservices: Yes or not?Microservices: Yes or not?
Microservices: Yes or not?
 
Asp.net mvc 5 course module 1 overview
Asp.net mvc 5 course   module 1 overviewAsp.net mvc 5 course   module 1 overview
Asp.net mvc 5 course module 1 overview
 
Full stack JavaScript - the folly of choice
Full stack JavaScript - the folly of choiceFull stack JavaScript - the folly of choice
Full stack JavaScript - the folly of choice
 
Performance testing with VSTs on- and off-premises
Performance testing with VSTs on-  and off-premisesPerformance testing with VSTs on-  and off-premises
Performance testing with VSTs on- and off-premises
 
ActiveMQ Performance Tuning
ActiveMQ Performance TuningActiveMQ Performance Tuning
ActiveMQ Performance Tuning
 
La vita nella corsia di sorpasso; A tutta velocità, XPages!
La vita nella corsia di sorpasso; A tutta velocità, XPages!La vita nella corsia di sorpasso; A tutta velocità, XPages!
La vita nella corsia di sorpasso; A tutta velocità, XPages!
 

Viewers also liked

Building a Progressive Web App
Building a  Progressive Web AppBuilding a  Progressive Web App
Building a Progressive Web AppIdo Green
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web AppsToninho Sousa
 
Introduction to Progressive Web App
Introduction to Progressive Web AppIntroduction to Progressive Web App
Introduction to Progressive Web AppBinh Bui
 
Offline-First Progressive Web Apps
Offline-First Progressive Web AppsOffline-First Progressive Web Apps
Offline-First Progressive Web AppsAditya Punjani
 
Progressive Web Apps / GDG DevFest - Season 2016
Progressive Web Apps / GDG DevFest - Season 2016Progressive Web Apps / GDG DevFest - Season 2016
Progressive Web Apps / GDG DevFest - Season 2016Abdelrahman Omran
 
Progressive Web Applications
Progressive Web ApplicationsProgressive Web Applications
Progressive Web ApplicationsBartek Igielski
 
Progressive Web Apps For Startups
Progressive Web Apps For StartupsProgressive Web Apps For Startups
Progressive Web Apps For StartupsIdo Green
 
Introduction to Progressive Web Apps, Google Developer Summit, Seoul - South ...
Introduction to Progressive Web Apps, Google Developer Summit, Seoul - South ...Introduction to Progressive Web Apps, Google Developer Summit, Seoul - South ...
Introduction to Progressive Web Apps, Google Developer Summit, Seoul - South ...Robert Nyman
 
Introduction to Progressive web app (PWA)
Introduction to Progressive web app (PWA)Introduction to Progressive web app (PWA)
Introduction to Progressive web app (PWA)Zhentian Wan
 
Progressive Web Apps: o melhor da Web appficada
Progressive Web Apps: o melhor da Web appficadaProgressive Web Apps: o melhor da Web appficada
Progressive Web Apps: o melhor da Web appficadaCaelum
 
Why Progressive Web App is what you need for your Business
Why Progressive Web App is what you need for your BusinessWhy Progressive Web App is what you need for your Business
Why Progressive Web App is what you need for your BusinessLets Grow Business
 
Developing a Progressive Mobile Strategy
Developing a Progressive Mobile StrategyDeveloping a Progressive Mobile Strategy
Developing a Progressive Mobile StrategyDave Olsen
 

Viewers also liked (13)

Building a Progressive Web App
Building a  Progressive Web AppBuilding a  Progressive Web App
Building a Progressive Web App
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
 
GDG Ibadan #pwa
GDG Ibadan #pwaGDG Ibadan #pwa
GDG Ibadan #pwa
 
Introduction to Progressive Web App
Introduction to Progressive Web AppIntroduction to Progressive Web App
Introduction to Progressive Web App
 
Offline-First Progressive Web Apps
Offline-First Progressive Web AppsOffline-First Progressive Web Apps
Offline-First Progressive Web Apps
 
Progressive Web Apps / GDG DevFest - Season 2016
Progressive Web Apps / GDG DevFest - Season 2016Progressive Web Apps / GDG DevFest - Season 2016
Progressive Web Apps / GDG DevFest - Season 2016
 
Progressive Web Applications
Progressive Web ApplicationsProgressive Web Applications
Progressive Web Applications
 
Progressive Web Apps For Startups
Progressive Web Apps For StartupsProgressive Web Apps For Startups
Progressive Web Apps For Startups
 
Introduction to Progressive Web Apps, Google Developer Summit, Seoul - South ...
Introduction to Progressive Web Apps, Google Developer Summit, Seoul - South ...Introduction to Progressive Web Apps, Google Developer Summit, Seoul - South ...
Introduction to Progressive Web Apps, Google Developer Summit, Seoul - South ...
 
Introduction to Progressive web app (PWA)
Introduction to Progressive web app (PWA)Introduction to Progressive web app (PWA)
Introduction to Progressive web app (PWA)
 
Progressive Web Apps: o melhor da Web appficada
Progressive Web Apps: o melhor da Web appficadaProgressive Web Apps: o melhor da Web appficada
Progressive Web Apps: o melhor da Web appficada
 
Why Progressive Web App is what you need for your Business
Why Progressive Web App is what you need for your BusinessWhy Progressive Web App is what you need for your Business
Why Progressive Web App is what you need for your Business
 
Developing a Progressive Mobile Strategy
Developing a Progressive Mobile StrategyDeveloping a Progressive Mobile Strategy
Developing a Progressive Mobile Strategy
 

Similar to Gwt overview & getting started

Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
 Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1... Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...WebStackAcademy
 
Swagger - Making REST APIs friendlier
Swagger - Making REST APIs friendlierSwagger - Making REST APIs friendlier
Swagger - Making REST APIs friendlierMiroslav Resetar
 
GWT HJUG Presentation
GWT HJUG PresentationGWT HJUG Presentation
GWT HJUG PresentationDerrick Bowen
 
SSJS, NoSQL, GAE and AppengineJS
SSJS, NoSQL, GAE and AppengineJSSSJS, NoSQL, GAE and AppengineJS
SSJS, NoSQL, GAE and AppengineJSEugene Lazutkin
 
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript FrameworksBuilding Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript FrameworksFITC
 
JavaScript in Universal Windows Platform apps
JavaScript in Universal Windows Platform appsJavaScript in Universal Windows Platform apps
JavaScript in Universal Windows Platform appsTimmy Kokke
 
Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]Ryan Cuprak
 
State of jQuery - AspDotNetStorefront Conference
State of jQuery - AspDotNetStorefront ConferenceState of jQuery - AspDotNetStorefront Conference
State of jQuery - AspDotNetStorefront Conferencedmethvin
 
Polygot Java EE on the GraalVM
Polygot Java EE on the GraalVMPolygot Java EE on the GraalVM
Polygot Java EE on the GraalVMRyan Cuprak
 
Dropwizard and Groovy
Dropwizard and GroovyDropwizard and Groovy
Dropwizard and Groovytomaslin
 
5 Treding Java Frameworks Offshore Developers Should About
5 Treding Java Frameworks Offshore Developers Should About5 Treding Java Frameworks Offshore Developers Should About
5 Treding Java Frameworks Offshore Developers Should AboutBJIT Ltd
 
Comparison of-angular-8 vs react-js
Comparison of-angular-8 vs react-jsComparison of-angular-8 vs react-js
Comparison of-angular-8 vs react-jseasyjobworld
 
Benefits of an Open environment with Wakanda
Benefits of an Open environment with WakandaBenefits of an Open environment with Wakanda
Benefits of an Open environment with WakandaAlexandre Morgaut
 
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo Shift Conference
 
JavaFX Versus HTML5 - JavaOne 2014
JavaFX Versus HTML5 - JavaOne 2014JavaFX Versus HTML5 - JavaOne 2014
JavaFX Versus HTML5 - JavaOne 2014Ryan Cuprak
 

Similar to Gwt overview & getting started (20)

GWT-Basics
GWT-BasicsGWT-Basics
GWT-Basics
 
GWT-Basics
GWT-BasicsGWT-Basics
GWT-Basics
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
 Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1... Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
 
Swagger - Making REST APIs friendlier
Swagger - Making REST APIs friendlierSwagger - Making REST APIs friendlier
Swagger - Making REST APIs friendlier
 
GWT HJUG Presentation
GWT HJUG PresentationGWT HJUG Presentation
GWT HJUG Presentation
 
SSJS, NoSQL, GAE and AppengineJS
SSJS, NoSQL, GAE and AppengineJSSSJS, NoSQL, GAE and AppengineJS
SSJS, NoSQL, GAE and AppengineJS
 
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript FrameworksBuilding Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
 
JavaScript in Universal Windows Platform apps
JavaScript in Universal Windows Platform appsJavaScript in Universal Windows Platform apps
JavaScript in Universal Windows Platform apps
 
Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]
 
State of jQuery - AspDotNetStorefront Conference
State of jQuery - AspDotNetStorefront ConferenceState of jQuery - AspDotNetStorefront Conference
State of jQuery - AspDotNetStorefront Conference
 
Polygot Java EE on the GraalVM
Polygot Java EE on the GraalVMPolygot Java EE on the GraalVM
Polygot Java EE on the GraalVM
 
Top 10 web application development frameworks 2016
Top 10 web application development frameworks 2016Top 10 web application development frameworks 2016
Top 10 web application development frameworks 2016
 
Dropwizard and Groovy
Dropwizard and GroovyDropwizard and Groovy
Dropwizard and Groovy
 
Gwt Presentation1
Gwt Presentation1Gwt Presentation1
Gwt Presentation1
 
5 Treding Java Frameworks Offshore Developers Should About
5 Treding Java Frameworks Offshore Developers Should About5 Treding Java Frameworks Offshore Developers Should About
5 Treding Java Frameworks Offshore Developers Should About
 
Comparison of-angular-8 vs react-js
Comparison of-angular-8 vs react-jsComparison of-angular-8 vs react-js
Comparison of-angular-8 vs react-js
 
01 java intro
01 java intro01 java intro
01 java intro
 
Benefits of an Open environment with Wakanda
Benefits of an Open environment with WakandaBenefits of an Open environment with Wakanda
Benefits of an Open environment with Wakanda
 
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
 
JavaFX Versus HTML5 - JavaOne 2014
JavaFX Versus HTML5 - JavaOne 2014JavaFX Versus HTML5 - JavaOne 2014
JavaFX Versus HTML5 - JavaOne 2014
 

Recently uploaded

INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinojohnmickonozaleda
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 

Recently uploaded (20)

INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipino
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 

Gwt overview & getting started

  • 1. The Google Web Toolkit (GWT) Overview & Getting Started buithaibinh@gmail.com 2014/5 1
  • 2. Topics in This Section ๏ What GWT is all about • Why(Love Story :D) • Advantages • Disadvantages ๏ Installing GWT • Core GWT • Eclipse plugin • Browser plugin ๏ Making a project • Using Eclipse plugin ๏ Testing process 2
  • 4. Why Web Apps(MVC)? • Downsides to browser-based apps • GUI is poor • HTML is OK for static documents, but lousy for programs • Communication is inefficient • HTTP is poor protocol for the way we now use Web apps 4
  • 5. Why Web Apps(MVC)? (Continued) • So why does everyone want Web apps? • Universal access • Everyone already has a browser installed • Any computer on the network can access content • Automatic “updates” (MVC) • Content comes from server, so is never out of date 5
  • 6. Why Ajax? • Solve three key problems of Web apps • Coarse-grained updates • Synchronous: you are frozen while waiting for result • Extremely limited options for widgets (GUI elements) • Still browser based • Ajax is about “what is the best you can do with what everyone already has in their browser?” • “Real” browser-based active content • Failed: Java Applets • Not universally supported; can’t interact with the HTML • Serious alternative: Flash/Flex • Not preinstalled on all PCs; not available for iPhone/iPad • Less proven • Microsoft Silverlight • JavaFX 6
  • 7. Ajax Problems • At least two languages are required • JavaScript on the client • Java or another language on the server • Invoking server is cumbersome • Even with JSON-RPC, DWR, or jQuery support • Want more powerful RPC mechanism • JavaScript scales poorly to large projects • No strong typing • Weak object hierarchies • Many run-time errors instead of compile-time errors • Incompatibility across platforms • Can’t use preexisting Java libraries or utilities 7
  • 8. Overview of the Google Web Toolkit (GWT) • Big Idea • You write both client-side and server-side code in Java • Client-side code • Uses an API similar to Swing • Most basic JDK 1.6 constructs and classes supported • Gets compiled into JavaScript that runs in your browser • Server-side code • Client uses a callback API and specifies data source URL • Once you define callback, you are mostly using regular Java method calls with complex arguments and return values • Server extends special class and defines regular methods • These are not servlet-style doBlah methods linked to HTTP • Arguments and return values can b • » Primitives, strings, arrays, a few java.util collections, Serializable custom classes 8
  • 9. Sites that Use GWT • Google Sites • Apache Wave, Google Base, • Google Checkout, • Google Moderator • Google Web • Google AdSense • Outside Sites • phuongbook.com :D 9
  • 10. Advantages of GWT • No JavaScript syntax errors • Use a reliable, strongly-typed language (Java) for development and debugging • No JavaScript programming at all! • Can use complex Java on the client • Turned into JavaScript, but you still use String, array, Math class, ArrayList, HashMap, custom classes, etc. • Full IDE-based Java support for development and debugging • Your client-side code can share data structures with your server-side code 10
  • 11. Advantages of GWT (Continued) • Can send complex Java types to/from the server • Real Java objects gets serialized across network. • More powerful and convenient approach than JSON-RPC • Standalone test environment • Can test within Eclipse without installing a new server • Support by a major company • Supported by the company that popularized Ajax in the first place • Support won’t go away like perhaps with AjaxTags 11
  • 12. Advantages of GWT (Continued) • Faster Apps • GWT uses deferred binding • Sends exactly the right code for the user’s circumstances • User agent • Locale • Debug vs. production • Network characteristics • Java is not compiled “blindly” into JavaScript • Many advanced compiler design techniques are used to make everything faster 12
  • 13. Disadvantages of GWT • Nonstandard approach to HTML & JavaScript • Programmatic creation of HTML can make use of standard HTML and CSS tools more difficult. • You never explicitly put JavaScript in your HTML. • Very powerful in the long run; hard to get used to at first. • Not search engine friendly • Google and others won’t index the dynamic content 13
  • 14. Disadvantages of GWT (Continued) • Only for Java developers • Most Ajax environments do JavaScript on the client and have a choice for the server. GWT is based entirely around Java. • GWT does support “normal” Ajax requests, but if you didn’t plan to mostly use Java on server, would you choose GWT in the first place? • Can’t(hard) make use of the good features of JavaScript • Fast prototyping, functional programming, easy DOM querying and manipulation (e.g., with jQuery) • Unusual approach • Fundamentally different strategy than all other Ajax tools makes evaluation and management buyoff harder 14
  • 16. Installation: Overview • Install Eclipse Plugin • https://developers.google.com/eclipse/docs/getting_started • Choose to install the GWT SDK at the same time • Install Browser Plugin • The first time you run in a browser in development mode, it will prompt you to install browser plugin. • See details in section on running in Production Mode • (Optional) Install GWT SDK • https://developers.google.com/web-toolkit/download • Download ZIP file and unzip into folder of your choice • Optional because you can get it bundled with Eclipse plugin • (Optional) Install Speed Tracer • Performance profiler. See top-level download page from first bullet. Not discussed here. 16
  • 17. Making a project - Demo 17
  • 19. Testing the Project in Development Mode 19
  • 20. Testing Project in Production Mode 20
  • 21. Deploying the Project to Normal Java App Server 21