SlideShare a Scribd company logo
Developing Ajax Web Apps with GWT Session I
Contents Introduction Traditional Web RIAs Emergence of Ajax Ajax Google Web Toolkit (GWT)‏ Installing and Setting up GWT in Eclipse The Project Structure Running the Application
Introduction The traditional web Document oriented Web Apps Rich Internet Applications (RIAs)‏ Emergence of Ajax XHTML, CSS Javascript Document formats – XML, JSON RIAs Webservices
The Traditional Web Document Oriented In 1991, Tim Berners Lee invented the web for the purpose of sharing documents easily Hypertext Markup Language (HTML)‏ Cascading Style Sheet (CSS)‏ Web Apps Web starts advancing to applications, e.g Yahoo in 1994 Communication with server through CGI (Perl script)‏ Forms, Javascript
Rich Internet Applications (RIAs)‏ Adobe Flash and Flex Most successful browser plugin—installed on 98 percent of Internet-enabled desktops. Relatively small download size and fast performance Graphic-designer-friendly development tool used to construct SWF files. Flex is geared toward software developers and provides data services such as remoting and messaging solutions to communicate to a Java 2 Enterprise Edition (J2EE) server.  Microsoft Silverlight Announced by Microsoft in 2007 its own RIA JavaFX Sun Microsystems announced Java FX at JavaOne in May 2007,  Consists of a Script and a Mobile module that run on a standard JRE
Emergence of Ajax XHMTL Similar expression to HTML but also conforms to XML CSS Language used to describe the presentation of document written in markup language comonly HTML Javascript Client side scripting language interpreted by the browser Netscape (ECMA Script)‏ DOM (Document Object Model) Model for representing and interacting with objects in HTML, XHTML and XML documents XML General-purpose specification for creating custom markup languages XMLHttpRequest (Javascript) API used to send an HTTP request directly to a web server and load the server response data directly back into the scripting language Webservices Web based applications that use open, XML-based standards and transport protocols to exchange data with clients Ajax Libraries Dojo toolkit, Scriptaculous, Yahoo User Interface (YUI) library
Asynchronous Javascript and XML (Ajax)‏ In February 2005, Jesse James Garrett of Adaptive Path coined the term Ajax (Asynchronous JavaScript and XML)  Ajax comprises of a set of technologies which made it possible for web applications to be interactive and rich close to that of desktop applications. Each individual element of a web page can be updated without reloading the entire page.
Traditional Web Application Interaction with the Server Source: Deitel and Deitel; Ajax, Rich Internet Applications and Web Development for Programmers; 2008
Ajax-based Web Application Interaction with the Server  Source: Deitel and Deitel; Ajax, Rich Internet Applications and Web Development for Programmers; 2008
Example of Ajax-based Applications Google Maps Gmail New Yahoo Mail Facebook, Facebook Chat Youtube
GWT (Google Web Toolkit)‏ With  the increase use of Ajax technologies to develop rich Internet applications, re-usability and maintenance becomes necessary Difficult to achieve with raw Ajax technologies JavaScript code compatibility issues across all platforms Non-typed nature of JavaScript makes it difficult for write and debug instantly. GWT is launched in May 2006 by Google to address these issues It is a set of development tools, programming utilities and widgets for developing Ajax-based rich Internet applications using Java  instead of JavaScript. GWT then cross-compiles the Java code into optimized JavaScript that automatically works across all major browsers Can be debugged and stepped through line by line.  The Java source code is compiled into stand-alone JavaScript files .
GWT cont'd Existing JavaScript libraries can be included Native Javascript codes can also be included using Javascript Native Interface (JSNI) Only web standards; doesn't  require any new runtimes or plugins. Provides libraries that simplifies communication with server-side technologies Code re-usability, management and maintenance were thus achieved just as any other Java code would be.  The current version of GWT is 1.6 .
GWT and Software Engineering Model From the developers' perspective, building Ajax-based Web Applications is like building any other Java Application (very similar to Swing applications). The object oriented nature of Java thus makes it possible to use models llike UML in analysis and design Documentation Standard-based documentations can be used Tools Application development process can leverage high-quality software engineering tools such as JUnit for test-driven development and IDEs like Eclipse that provide superior debugging support and compile-time error checking on the fly. Re-usability Re-usable widgets for user interface can be created Maintainability Maintainable codes can be developed through the use of object oriented design patterns.
GWT Showcase http://ongwt.googlecode.com/svn/trunk/com.google.gwt.sample.showcase.Showcase/Showcase.html Smart GWT showcase – Rich widgets built using GWT http://www.smartclient.com/smartgwt/showcase/
Benefits of GWT in Summary Building Rich Interfaces with Widgets and Panels Getting Better Performance with Asynchronous Communication Providing interoperation through Web Standards and Web Services Speeding Development Using Java Tools
Installing and Setting up GWT In this tutorial we would setup and install  GWT 1.6, the latest version released in April, 2009. Eclipse IDE and GWT plugin for Eclipse would be used. Java Development Kit (JDK) 1.5 or higher is required Download URLs  JDK (http://java.sun.com/javase/downloads)‏ Eclipse 3.4 Ganymede IDE (http://www.eclipse.org/downloads/)‏ GWT  Google Eclipse Plugin  (http://code.google.com/eclipse/docs/install-eclipse-3.4.html)* * We would install GWT and the plugin using the Eclipse IDE Software updater tool, so you don't need to download both the GWT and the plugin separately
Installing JDK and Eclipse It is assumed that you already have JDK 1.5 or higher installed on your system. If it is not installed, you may download and install from this URL  (http://java.sun.com/javase/downloads) Also download Eclipse from http://www.eclipse.org/downloads/ and extract it in any location.  Note: For the purpose of this training, all required applications are available in the CD provided.
Running Eclipse You can start the IDE by clicking on the eclipse executable file  located in the eclipse folder you extracted.
Installing the Google Plugin This installation notes are extracted from the GWT website: http://code.google.com/eclipse/docs/install-eclipse-3.4.html
Installing the Google Plugin – cont’d
Installing the Google Plugin – cont’d
Installing the Google Plugin – cont’d
Installing the Google Plugin – cont’d
Installing the Google Plugin – cont’d
Creating a New Project with Eclipse Select File > New > Web Application Project Input GWTTraining in the Project name field Input my.utm.kase.gwttraining in the Package field Leave the location as the default (Create new project in workspace)‏ Uncheck the Use Google App Engine (This only appears if you have installed the Google App Engine plugin for Eclipse)‏ Click Finish to create the project.
The Project Structure The GWTTraining project is shown in the Package Explorer  Expand the GWTTraining to view the contents of the project structure Four items are created for the project: src: Source files GWT SDK: GWT libraries JRE System Library: Java Runtime library war:
The src Folder The src folder contains the main GWT configuration file for the project and source codes. The configuration file (GWTTraining.gwt.xml) is located under the main package, my.utm.kase.gwttraining. A package for client-related codes is created under the main package (my.utm.kase.gwttraining.client). All client codes are required to be in this package. A package for server-related codes is created under the main package (my.utm.kase.gwttraining.server). This is the default created by Eclipse, but it is not mandatory.
GWT Application Configuration file This file specifies the application’s configuration options for the GWT compiler The com.google.gwt.user.User module is inherited which is required for the User Interface com.google.gwwt.usser.theme.standard.Standard is specified to be used as the theme for this application. You may select the Chrome or Dark theme by un-commenting the corresponding <inherits> tag. The GWT compiler needs to know the entry-point of the application (i.e. main class). This is specified in the <entry-point> tag.
The war Folder The war folder structured in the standard Java web app &quot;expanded war&quot; format to simplify application deployment. It contains the compiler output and handwritten static resources that should be included included in the  web application alongside GWT modules. The file /war/WEB-INF/web.xml is used for configuring server-side codes using the standard Java servlet configuration.  Libraries used in the server-side are placed in the into /war/WEB-INF/lib folder. The gwt-servlet.jar is required for the GWT RPC servlets. GWTTraining.css and GWTTraining.html are static files for the apllications' main style definition and html respectively. Further reading (http://code.google.com/webtoolkit/doc/1.6/ReleaseNotes_1_6.html)‏
Running the Application Select GWTTraining from the Package Explorer Click the Run button (  )  on the toolbar The Application is run on a hosted mode for easy debugging and testing which be deployed to the main server that will host it when ready. Two windows are displayed: the log window which displays information about the running application and a browser that runs the application
Running the Application – cont’d You may try the application by entering your name and clicking enter. A dialog box displaying the server version and browser information would be displayed
End of Session I Session II of this tutorial would take us through building the client side of Web application using GWT. We would explore the available user interface widgets available in GWT library and learn how to use them. Thank you.
Ad

More Related Content

What's hot (20)

Android how to hellowidget
Android how to hellowidgetAndroid how to hellowidget
Android how to hellowidget
Mohammad Ali Raza Siddiqui
 
How to Build ToDo App with Vue 3 + TypeScript
How to Build ToDo App with Vue 3 + TypeScriptHow to Build ToDo App with Vue 3 + TypeScript
How to Build ToDo App with Vue 3 + TypeScript
Katy Slemon
 
Adding a view
Adding a viewAdding a view
Adding a view
Nhan Do
 
GQuery a jQuery clone for Gwt, RivieraDev 2011
GQuery a jQuery clone for Gwt, RivieraDev 2011GQuery a jQuery clone for Gwt, RivieraDev 2011
GQuery a jQuery clone for Gwt, RivieraDev 2011
Manuel Carrasco Moñino
 
Creating lightweight JS Apps w/ Web Components and lit-html
Creating lightweight JS Apps w/ Web Components and lit-htmlCreating lightweight JS Apps w/ Web Components and lit-html
Creating lightweight JS Apps w/ Web Components and lit-html
Ilia Idakiev
 
Introduction to Google Guice
Introduction to Google GuiceIntroduction to Google Guice
Introduction to Google Guice
Knoldus Inc.
 
React workshop
React workshopReact workshop
React workshop
Imran Sayed
 
Di code steps
Di code stepsDi code steps
Di code steps
Brian Kiptoo
 
Android Data Binding in action using MVVM pattern - droidconUK
Android Data Binding in action using MVVM pattern - droidconUKAndroid Data Binding in action using MVVM pattern - droidconUK
Android Data Binding in action using MVVM pattern - droidconUK
Fabio Collini
 
Day 6
Day 6Day 6
Day 6
Vivek Bhusal
 
How to build crud application using vue js, graphql, and hasura
How to build crud application using vue js, graphql, and hasuraHow to build crud application using vue js, graphql, and hasura
How to build crud application using vue js, graphql, and hasura
Katy Slemon
 
Vaadin 7 CN
Vaadin 7 CNVaadin 7 CN
Vaadin 7 CN
jojule
 
Predictable Web Apps with Angular and Redux
Predictable Web Apps with Angular and ReduxPredictable Web Apps with Angular and Redux
Predictable Web Apps with Angular and Redux
FITC
 
Google Guice
Google GuiceGoogle Guice
Google Guice
Andriy Andrunevchyn
 
Android training day 4
Android training day 4Android training day 4
Android training day 4
Vivek Bhusal
 
GWT integration with Vaadin
GWT integration with VaadinGWT integration with Vaadin
GWT integration with Vaadin
Peter Lehto
 
Vaadin DevDay 2017 - DI your UI
Vaadin DevDay 2017 - DI your UIVaadin DevDay 2017 - DI your UI
Vaadin DevDay 2017 - DI your UI
Peter Lehto
 
Knockout in action
Knockout in actionKnockout in action
Knockout in action
Gerardo Leyes
 
Wave Workshop
Wave WorkshopWave Workshop
Wave Workshop
Jason Dinh
 
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
vchircu
 
How to Build ToDo App with Vue 3 + TypeScript
How to Build ToDo App with Vue 3 + TypeScriptHow to Build ToDo App with Vue 3 + TypeScript
How to Build ToDo App with Vue 3 + TypeScript
Katy Slemon
 
Adding a view
Adding a viewAdding a view
Adding a view
Nhan Do
 
GQuery a jQuery clone for Gwt, RivieraDev 2011
GQuery a jQuery clone for Gwt, RivieraDev 2011GQuery a jQuery clone for Gwt, RivieraDev 2011
GQuery a jQuery clone for Gwt, RivieraDev 2011
Manuel Carrasco Moñino
 
Creating lightweight JS Apps w/ Web Components and lit-html
Creating lightweight JS Apps w/ Web Components and lit-htmlCreating lightweight JS Apps w/ Web Components and lit-html
Creating lightweight JS Apps w/ Web Components and lit-html
Ilia Idakiev
 
Introduction to Google Guice
Introduction to Google GuiceIntroduction to Google Guice
Introduction to Google Guice
Knoldus Inc.
 
Android Data Binding in action using MVVM pattern - droidconUK
Android Data Binding in action using MVVM pattern - droidconUKAndroid Data Binding in action using MVVM pattern - droidconUK
Android Data Binding in action using MVVM pattern - droidconUK
Fabio Collini
 
How to build crud application using vue js, graphql, and hasura
How to build crud application using vue js, graphql, and hasuraHow to build crud application using vue js, graphql, and hasura
How to build crud application using vue js, graphql, and hasura
Katy Slemon
 
Vaadin 7 CN
Vaadin 7 CNVaadin 7 CN
Vaadin 7 CN
jojule
 
Predictable Web Apps with Angular and Redux
Predictable Web Apps with Angular and ReduxPredictable Web Apps with Angular and Redux
Predictable Web Apps with Angular and Redux
FITC
 
Android training day 4
Android training day 4Android training day 4
Android training day 4
Vivek Bhusal
 
GWT integration with Vaadin
GWT integration with VaadinGWT integration with Vaadin
GWT integration with Vaadin
Peter Lehto
 
Vaadin DevDay 2017 - DI your UI
Vaadin DevDay 2017 - DI your UIVaadin DevDay 2017 - DI your UI
Vaadin DevDay 2017 - DI your UI
Peter Lehto
 
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
vchircu
 

Similar to GWT Training - Session 1/3 (20)

GWT training session 1
GWT training session 1GWT training session 1
GWT training session 1
SNEHAL MASNE
 
Google Web Toolkit
Google Web ToolkitGoogle Web Toolkit
Google Web Toolkit
Michael Angelo Rivera
 
Google Web Toolkit Introduction - eXo Platform SEA
Google Web Toolkit Introduction - eXo Platform SEAGoogle Web Toolkit Introduction - eXo Platform SEA
Google Web Toolkit Introduction - eXo Platform SEA
nerazz08
 
Javascript as a target language - GWT KickOff - Part 2/2
Javascript as a target language - GWT KickOff - Part 2/2Javascript as a target language - GWT KickOff - Part 2/2
Javascript as a target language - GWT KickOff - Part 2/2
JooinK
 
Google Cloud Platform
Google Cloud Platform Google Cloud Platform
Google Cloud Platform
Francesco Marchitelli
 
GWT Introduction for Eclipse Day
GWT Introduction for Eclipse Day GWT Introduction for Eclipse Day
GWT Introduction for Eclipse Day
DNG Consulting
 
Google Web Toolkit
Google Web ToolkitGoogle Web Toolkit
Google Web Toolkit
Software Park Thailand
 
Java Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web ToolkitJava Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
IMC Institute
 
GWT + Gears : The browser is the platform
GWT + Gears : The browser is the platformGWT + Gears : The browser is the platform
GWT + Gears : The browser is the platform
Didier Girard
 
GWT- Google Web Toolkit
GWT- Google Web ToolkitGWT- Google Web Toolkit
GWT- Google Web Toolkit
Momentum Design Lab
 
Tech Stack - Angular
Tech Stack - AngularTech Stack - Angular
Tech Stack - Angular
Srineel Mazumdar
 
HTML5 introduction for beginners
HTML5 introduction for beginnersHTML5 introduction for beginners
HTML5 introduction for beginners
Vineeth N Krishnan
 
Html5
Html5Html5
Html5
mikusuraj
 
Phonegap android angualr material design
Phonegap android angualr material designPhonegap android angualr material design
Phonegap android angualr material design
Srinadh Kanugala
 
PPT Companion to Android
PPT Companion to AndroidPPT Companion to Android
PPT Companion to Android
Dharani Kumar Madduri
 
sveltekit-en.pdf
sveltekit-en.pdfsveltekit-en.pdf
sveltekit-en.pdf
ssuser65180a
 
Ajax
Ajax Ajax
Ajax
padmaashree Arunachalem
 
Gwt Presentation1
Gwt Presentation1Gwt Presentation1
Gwt Presentation1
rajakumar.tu
 
Web II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side developmentWeb II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side development
Randy Connolly
 
CiklumJavaSat15112011:Andrew Mormysh-GWT features overview
CiklumJavaSat15112011:Andrew Mormysh-GWT features overviewCiklumJavaSat15112011:Andrew Mormysh-GWT features overview
CiklumJavaSat15112011:Andrew Mormysh-GWT features overview
Ciklum Ukraine
 
GWT training session 1
GWT training session 1GWT training session 1
GWT training session 1
SNEHAL MASNE
 
Google Web Toolkit Introduction - eXo Platform SEA
Google Web Toolkit Introduction - eXo Platform SEAGoogle Web Toolkit Introduction - eXo Platform SEA
Google Web Toolkit Introduction - eXo Platform SEA
nerazz08
 
Javascript as a target language - GWT KickOff - Part 2/2
Javascript as a target language - GWT KickOff - Part 2/2Javascript as a target language - GWT KickOff - Part 2/2
Javascript as a target language - GWT KickOff - Part 2/2
JooinK
 
GWT Introduction for Eclipse Day
GWT Introduction for Eclipse Day GWT Introduction for Eclipse Day
GWT Introduction for Eclipse Day
DNG Consulting
 
Java Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web ToolkitJava Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
IMC Institute
 
GWT + Gears : The browser is the platform
GWT + Gears : The browser is the platformGWT + Gears : The browser is the platform
GWT + Gears : The browser is the platform
Didier Girard
 
HTML5 introduction for beginners
HTML5 introduction for beginnersHTML5 introduction for beginners
HTML5 introduction for beginners
Vineeth N Krishnan
 
Phonegap android angualr material design
Phonegap android angualr material designPhonegap android angualr material design
Phonegap android angualr material design
Srinadh Kanugala
 
Web II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side developmentWeb II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side development
Randy Connolly
 
CiklumJavaSat15112011:Andrew Mormysh-GWT features overview
CiklumJavaSat15112011:Andrew Mormysh-GWT features overviewCiklumJavaSat15112011:Andrew Mormysh-GWT features overview
CiklumJavaSat15112011:Andrew Mormysh-GWT features overview
Ciklum Ukraine
 
Ad

Recently uploaded (20)

GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
How to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 WebsiteHow to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 Website
Celine George
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
To study Digestive system of insect.pptx
To study Digestive system of insect.pptxTo study Digestive system of insect.pptx
To study Digestive system of insect.pptx
Arshad Shaikh
 
How to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odooHow to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odoo
Celine George
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx
contactwilliamm2546
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Library Association of Ireland
 
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Library Association of Ireland
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
Biophysics Chapter 3 Methods of Studying Macromolecules.pdf
Biophysics Chapter 3 Methods of Studying Macromolecules.pdfBiophysics Chapter 3 Methods of Studying Macromolecules.pdf
Biophysics Chapter 3 Methods of Studying Macromolecules.pdf
PKLI-Institute of Nursing and Allied Health Sciences Lahore , Pakistan.
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
How to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 WebsiteHow to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 Website
Celine George
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
To study Digestive system of insect.pptx
To study Digestive system of insect.pptxTo study Digestive system of insect.pptx
To study Digestive system of insect.pptx
Arshad Shaikh
 
How to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odooHow to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odoo
Celine George
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx
contactwilliamm2546
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Library Association of Ireland
 
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Library Association of Ireland
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
Ad

GWT Training - Session 1/3

  • 1. Developing Ajax Web Apps with GWT Session I
  • 2. Contents Introduction Traditional Web RIAs Emergence of Ajax Ajax Google Web Toolkit (GWT)‏ Installing and Setting up GWT in Eclipse The Project Structure Running the Application
  • 3. Introduction The traditional web Document oriented Web Apps Rich Internet Applications (RIAs)‏ Emergence of Ajax XHTML, CSS Javascript Document formats – XML, JSON RIAs Webservices
  • 4. The Traditional Web Document Oriented In 1991, Tim Berners Lee invented the web for the purpose of sharing documents easily Hypertext Markup Language (HTML)‏ Cascading Style Sheet (CSS)‏ Web Apps Web starts advancing to applications, e.g Yahoo in 1994 Communication with server through CGI (Perl script)‏ Forms, Javascript
  • 5. Rich Internet Applications (RIAs)‏ Adobe Flash and Flex Most successful browser plugin—installed on 98 percent of Internet-enabled desktops. Relatively small download size and fast performance Graphic-designer-friendly development tool used to construct SWF files. Flex is geared toward software developers and provides data services such as remoting and messaging solutions to communicate to a Java 2 Enterprise Edition (J2EE) server. Microsoft Silverlight Announced by Microsoft in 2007 its own RIA JavaFX Sun Microsystems announced Java FX at JavaOne in May 2007, Consists of a Script and a Mobile module that run on a standard JRE
  • 6. Emergence of Ajax XHMTL Similar expression to HTML but also conforms to XML CSS Language used to describe the presentation of document written in markup language comonly HTML Javascript Client side scripting language interpreted by the browser Netscape (ECMA Script)‏ DOM (Document Object Model) Model for representing and interacting with objects in HTML, XHTML and XML documents XML General-purpose specification for creating custom markup languages XMLHttpRequest (Javascript) API used to send an HTTP request directly to a web server and load the server response data directly back into the scripting language Webservices Web based applications that use open, XML-based standards and transport protocols to exchange data with clients Ajax Libraries Dojo toolkit, Scriptaculous, Yahoo User Interface (YUI) library
  • 7. Asynchronous Javascript and XML (Ajax)‏ In February 2005, Jesse James Garrett of Adaptive Path coined the term Ajax (Asynchronous JavaScript and XML) Ajax comprises of a set of technologies which made it possible for web applications to be interactive and rich close to that of desktop applications. Each individual element of a web page can be updated without reloading the entire page.
  • 8. Traditional Web Application Interaction with the Server Source: Deitel and Deitel; Ajax, Rich Internet Applications and Web Development for Programmers; 2008
  • 9. Ajax-based Web Application Interaction with the Server Source: Deitel and Deitel; Ajax, Rich Internet Applications and Web Development for Programmers; 2008
  • 10. Example of Ajax-based Applications Google Maps Gmail New Yahoo Mail Facebook, Facebook Chat Youtube
  • 11. GWT (Google Web Toolkit)‏ With the increase use of Ajax technologies to develop rich Internet applications, re-usability and maintenance becomes necessary Difficult to achieve with raw Ajax technologies JavaScript code compatibility issues across all platforms Non-typed nature of JavaScript makes it difficult for write and debug instantly. GWT is launched in May 2006 by Google to address these issues It is a set of development tools, programming utilities and widgets for developing Ajax-based rich Internet applications using Java instead of JavaScript. GWT then cross-compiles the Java code into optimized JavaScript that automatically works across all major browsers Can be debugged and stepped through line by line. The Java source code is compiled into stand-alone JavaScript files .
  • 12. GWT cont'd Existing JavaScript libraries can be included Native Javascript codes can also be included using Javascript Native Interface (JSNI) Only web standards; doesn't require any new runtimes or plugins. Provides libraries that simplifies communication with server-side technologies Code re-usability, management and maintenance were thus achieved just as any other Java code would be. The current version of GWT is 1.6 .
  • 13. GWT and Software Engineering Model From the developers' perspective, building Ajax-based Web Applications is like building any other Java Application (very similar to Swing applications). The object oriented nature of Java thus makes it possible to use models llike UML in analysis and design Documentation Standard-based documentations can be used Tools Application development process can leverage high-quality software engineering tools such as JUnit for test-driven development and IDEs like Eclipse that provide superior debugging support and compile-time error checking on the fly. Re-usability Re-usable widgets for user interface can be created Maintainability Maintainable codes can be developed through the use of object oriented design patterns.
  • 14. GWT Showcase http://ongwt.googlecode.com/svn/trunk/com.google.gwt.sample.showcase.Showcase/Showcase.html Smart GWT showcase – Rich widgets built using GWT http://www.smartclient.com/smartgwt/showcase/
  • 15. Benefits of GWT in Summary Building Rich Interfaces with Widgets and Panels Getting Better Performance with Asynchronous Communication Providing interoperation through Web Standards and Web Services Speeding Development Using Java Tools
  • 16. Installing and Setting up GWT In this tutorial we would setup and install GWT 1.6, the latest version released in April, 2009. Eclipse IDE and GWT plugin for Eclipse would be used. Java Development Kit (JDK) 1.5 or higher is required Download URLs JDK (http://java.sun.com/javase/downloads)‏ Eclipse 3.4 Ganymede IDE (http://www.eclipse.org/downloads/)‏ GWT Google Eclipse Plugin (http://code.google.com/eclipse/docs/install-eclipse-3.4.html)* * We would install GWT and the plugin using the Eclipse IDE Software updater tool, so you don't need to download both the GWT and the plugin separately
  • 17. Installing JDK and Eclipse It is assumed that you already have JDK 1.5 or higher installed on your system. If it is not installed, you may download and install from this URL (http://java.sun.com/javase/downloads) Also download Eclipse from http://www.eclipse.org/downloads/ and extract it in any location. Note: For the purpose of this training, all required applications are available in the CD provided.
  • 18. Running Eclipse You can start the IDE by clicking on the eclipse executable file located in the eclipse folder you extracted.
  • 19. Installing the Google Plugin This installation notes are extracted from the GWT website: http://code.google.com/eclipse/docs/install-eclipse-3.4.html
  • 20. Installing the Google Plugin – cont’d
  • 21. Installing the Google Plugin – cont’d
  • 22. Installing the Google Plugin – cont’d
  • 23. Installing the Google Plugin – cont’d
  • 24. Installing the Google Plugin – cont’d
  • 25. Creating a New Project with Eclipse Select File > New > Web Application Project Input GWTTraining in the Project name field Input my.utm.kase.gwttraining in the Package field Leave the location as the default (Create new project in workspace)‏ Uncheck the Use Google App Engine (This only appears if you have installed the Google App Engine plugin for Eclipse)‏ Click Finish to create the project.
  • 26. The Project Structure The GWTTraining project is shown in the Package Explorer Expand the GWTTraining to view the contents of the project structure Four items are created for the project: src: Source files GWT SDK: GWT libraries JRE System Library: Java Runtime library war:
  • 27. The src Folder The src folder contains the main GWT configuration file for the project and source codes. The configuration file (GWTTraining.gwt.xml) is located under the main package, my.utm.kase.gwttraining. A package for client-related codes is created under the main package (my.utm.kase.gwttraining.client). All client codes are required to be in this package. A package for server-related codes is created under the main package (my.utm.kase.gwttraining.server). This is the default created by Eclipse, but it is not mandatory.
  • 28. GWT Application Configuration file This file specifies the application’s configuration options for the GWT compiler The com.google.gwt.user.User module is inherited which is required for the User Interface com.google.gwwt.usser.theme.standard.Standard is specified to be used as the theme for this application. You may select the Chrome or Dark theme by un-commenting the corresponding <inherits> tag. The GWT compiler needs to know the entry-point of the application (i.e. main class). This is specified in the <entry-point> tag.
  • 29. The war Folder The war folder structured in the standard Java web app &quot;expanded war&quot; format to simplify application deployment. It contains the compiler output and handwritten static resources that should be included included in the web application alongside GWT modules. The file /war/WEB-INF/web.xml is used for configuring server-side codes using the standard Java servlet configuration. Libraries used in the server-side are placed in the into /war/WEB-INF/lib folder. The gwt-servlet.jar is required for the GWT RPC servlets. GWTTraining.css and GWTTraining.html are static files for the apllications' main style definition and html respectively. Further reading (http://code.google.com/webtoolkit/doc/1.6/ReleaseNotes_1_6.html)‏
  • 30. Running the Application Select GWTTraining from the Package Explorer Click the Run button ( ) on the toolbar The Application is run on a hosted mode for easy debugging and testing which be deployed to the main server that will host it when ready. Two windows are displayed: the log window which displays information about the running application and a browser that runs the application
  • 31. Running the Application – cont’d You may try the application by entering your name and clicking enter. A dialog box displaying the server version and browser information would be displayed
  • 32. End of Session I Session II of this tutorial would take us through building the client side of Web application using GWT. We would explore the available user interface widgets available in GWT library and learn how to use them. Thank you.