Google Web Toolkit Tutorial

Slides:



Advertisements
Similar presentations
Samsung Smart TV is a web-based application running on an application engine installed on digital TVs connected to the Internet.
Advertisements

Google Web Toolkit (GWT) Steve Wargolet. Introduction Desktop client-server applications and their drawbacks. Static-only Web pages Introduction of Web.
Web Toolkit Julie George & Ronald Lopez 1. Requirements  Java SDK version 1.5 or later  Apache Ant is also necessary to run command line arguments 
1 GWT Google Web Toolkit Build AJAX apps in the Java language
P&O3: Tools & methodologies Stefaan Ternier. Overview TCP/IP Servlets Google Web Toolkit Google Maps JPDA.
© 2007 IBM Corporation IBM Emerging Technologies Enabling an Accessible Web 2.0 Becky Gibson Web Accessibility Architect.
Google Web Toolkit - Gufran Mohammed. Google Web Toolkit (GWT) is an open source Java software development framework that makes writing AJAX applications.
Lecture 3B: Client-Side Scripting IT 202—Internet Applications Based on notes developed by Morgan Benton.
Microsoft ASP.NET AJAX - AJAX as it has to be Presented by : Rana Vijayasimha Nalla CSCE Grad Student.
Hello Vaadin! CS 3130 Summer 2015.
Web Applications Basics. Introduction to Web Web features Clent/Server HTTP HyperText Markup Language URL addresses Web server - a computer program that.
Julien Thibault / Phil Brewster / Kristina Doing-Harris
Intelligent Tutoring System Mobile Communication Team Drew Boatwright Nakul Dureja Richard Liou.
WHAT IS PHP PHP is an HTML-embedded scripting language primarily used for dynamic Web applications.
Chapter 6 DOJO TOOLKITS. Objectives Discuss XML DOM Discuss JSON Discuss Ajax Response in XML, HTML, JSON, and Other Data Type.
Java Server Pages (JSP) Presented by: Ananth Prasad & Alex Ivanov May 10, 2001.
Server Side Scripting Norman White. Where do we do processing? Client side – Javascript (embed code in html) – Java applets (send java program to run.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
Christopher Paolini Computational Science Research Center College of Engineering San Diego State University Computational Science 670 Fall 2009 Monday.
P&O3: Tools & methodologies Stefaan Ternier. Overview TCP/IP Servlets Google Web Toolkit Google Maps JPDA.
JavaScript & jQuery the missing manual Chapter 11
Java Mobile Apps with GWT & PhoneGap Josh Marinacci, webOS Developer Advocate.
Writing various AJAX forms in Drupal 7 1. Overview of Form API 2. Ctools 2.1 Ctools features 3. Ajax 3.1 Ajax Forms in Drupal 4. Putting it all together.
M1G Introduction to Database Development 6. Building Applications.
Google Web Toolkit An Overview By Shauvik Roy Choudhary.
Lecturer: Prof. Piero Fraternali, Teaching Assistant: Alessandro Bozzon, Advanced Web Technologies: Struts–
GWT In-depth Explained by Rohit Ghatol
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
Topic Java EE installation (Eclipse, glassfish, etc.) Eclipse configuration for EE Creating a Java Web Dynamic Project Creating your first servlet.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 14 Database Connectivity and Web Technologies.
Ajax for Dynamic Web Development Gregory McChesney.
INFSOM-RI The ETICS Web Portal WP5 activity Tomasz Kokoszka CERN/WP5.
Ajax and the GWT. Ajax  Asynchronous JavaScript And XML  Technology behind interactive web sites  Provide smoother experience than conventional web.
Core basic Java web server technologies. Tools Eclipse IDE for Java EE Developers (Netbeans also works) nloads/packages/eclipse-
Java Programming: Advanced Topics 1 Building Web Applications Chapter 13.
Google Code Libraries Dima Ionut Daniel. Contents What is Google Code? LDAPBeans Object-ldap-mapping Ldap-ODM Bug4j jOOR Rapa jongo Conclusion Bibliography.
Google Web Toolkit for Mobile Applications Development INGENUITY AT ITS BEST……………….
Online Data Monitoring Framework Based on Histogram Packaging in Network Distributed Data Acquisition Systems Tomoyuki Konno 1, Anatael Cabrera 2, Masaki.
CSCI 3100 Tutorial 5 JavaScript & Ajax Jichuan Zeng Department of Computer Science and Engineering The Chinese University of Hong.
G046 – Lecture 2A Recognising Web-Technologies Mr C Johnston ICT Teacher
Technologies For Creating Rich Internet Applications Presenter's name
4.01 How Web Pages Work.
CS3220 Web and Internet Programming RESTful Web Service
Applications Active Web Documents Active Web Documents.
4.01 How Web Pages Work.
Objective % Select and utilize tools to design and develop websites.
JavaScript and Ajax (Ajax Tutorial)
Writing simple Java Web Services using Eclipse
Working with Client-Side Scripting
Outline SOAP and Web Services in relation to Distributed Objects
Java Distributed Computing
Google Web Toolkit - Gufran Mohammed
Application with Cross-Platform GUI
Outline SOAP and Web Services in relation to Distributed Objects
Objective % Select and utilize tools to design and develop websites.
AJAX.
PHP / MySQL Introduction
JavaScript an introduction.
J2EE Application Development
DWR: Direct Web Remoting
jQuery The Easy JavaScript Nikolay Chochev Technical Trainer
Java Server Pages (JSP)
Google App Engine Ying Zou 01/24/2016.
ASP.NET Module Subtitle.
JavaServer Faces: The Fundamentals
Teaching slides Chapter 6.
WPS - your story so far Seems incredible complicated, already
4.01 How Web Pages Work.
MOBILE PROGRAMMING Meriska Defriani, S.Komp, M.Kom Introduction
Web Application Development Using PHP
Presentation transcript:

Google Web Toolkit Tutorial

Introduction to the Google Web Toolkit What will be covered in this tutorial: An introduction to the toolkit and its uses. The construction of a simple demo program. Deployment to a tomcat web server.

What is the Google Web Toolkit?(GWT) GWT is a tool for developing web application using (relatively) standard java code. Converts client-side java code into AJAX script that can be run on a browser.

Why Use GWT? Java allows for an Object-oriented approch. GWT GUI's are build very much like java Swing apps Requires very little knowledge of other web languages like html or javascript. Tools provided make it easy to test during development. Integrates easily with IDEs.

The Demo App: Address Finder Address Finder is a simple web application with two basic functions. Creates a profile with the user's name and address on a server. Retrieves a profile from the server when given a name. Client Profile Servlet User Name

Getting Started Download GWT from Google at: http://code.google.com/webtoolkit/download.html Download GWT plugin for Eclipse: http://code.google.com/eclipse/ The plugin for eclipse is very helpful, but not necessary For the purpose of this tutorial it is assumed that the plugin is used.

Creating the Project The project can be created easily in eclipse from the new project list by selecting new “Web Application Project” GWT automatically creates appropriate files (Including an example program)

Project Organization src war Contains the source files for the project. Also contains gwt module file. war Contains compiled javascript pages for deployment. Also contains the entry page (AddressFinder.html) and its style sheet (AddressFinder.css)

Creating the Client The web application is embedded in the page AddressFinder.html. When the application is loaded, GWT activates the EntryPoint.onModuleLoad() method in each EntryPoint. AddressFinder.java AddressFinder.onModuleLoad() AddressFinder.HTML

Creating the Starting Page Almost all client-side code is contained in javascript The project EntryPoint is embedded in the page by an id tag in the script, “finderTag”.

Building the GUI Very similar to the java Swing API. All graphical objects based off Widget class. The root panel adds the main panel to tag “finderTag”, embedding the application in the html page. Styling names can be attached to the Widgets for use in the CSS style sheet.

Applying Style Styles codded in the CSS file can be attached directly to graphical elements. CSS styles can be used dynamically and are automatically updated when an object changes styles.

Talking to the Server: The RPC Mechanism = Class = Interface Async Call Interface (ProfileServiceAsync) Client (AddressFinder) RemoteServiceServlet (ProfileServiceImpl) RemoteService (ProfileService)

RPC Continued... GWT handles all the low-level network communication and serialization. GWT compiler uses naming standards to link the various RPC interfaces. (ProfileService, ProfileServiceAsync, ProfileServiceImpl) Calls from client are asynchronous; the client does not wait for a response.

Implementing RPC Both interfaces must contain methods of the same names. The AsyncCallback argument of client side interface is essentially a wrapper for the function the server calls to answer the client.

Implementing RPC: Profile class Profile class simply packages the name and address together. Profile must implement Serializable for GWT to send it between the server and client.

Implementing RPC: Client side Creates an implementation of the async interface by making a call to GWT. AsyncCallback class forms a wrapper around the server return function. Client calls server through async interface and sends callback function that is notified when the call completes.

Implementing RPC: Server side Server side code is not converted and so may us any java library. The servlet has the ability to access files on the server. Throwing exceptions back to the client is also supported.

Mapping the service for GWT The tag defined here in the servlet mapping is connected to the service. web.xml also points to the starting html page for the web application

Hosted mode and Deployment GWT provides hosted mode for application testing staight out of the IDE. After compilation, deployment to the servlet consists of moving the war folder, which contains all the necessary files, to the webapps folder in the tomcat directory

Conclusion GWT makes it easy for a java developer to quickly write web applications without having to extensivly know web languages like html and javascript. This tutorial is ment to go with the AddressFinder souce and only examines significant sections of the code.