Developing Ajax Web Apps with GWT. Session I

Similar documents
IBM JZOS Meets Web 2.0

Web 2.0, AJAX and RIAs

GRITS AJAX & GWT. Trey Roby. GRITS 5/14/09 Roby - 1

AJAX: Rich Internet Applications

COPYRIGHTED MATERIAL. Part I: Getting Started. Chapter 1: Introducing Flex 2.0. Chapter 2: Introducing Flex Builder 2.0. Chapter 3: Flex 2.

Credits: Some of the slides are based on material adapted from

Google Plugin for Eclipse

Lesson 12: JavaScript and AJAX

Tooling for Ajax-Based Development. Craig R. McClanahan Senior Staff Engineer Sun Microsystems, Inc.

1 Introduction. 2 Web Architecture

Say goodbye to the pains of Ajax. Yibo

Development of web applications using Google Technology

Introduction Haim Michael. All Rights Reserved.

Etanova Enterprise Solutions

Web 2.0 Käyttöliittymätekniikat

Ajax For Java Developers

Interactive webmaps with ArcGIS. Kristel Meikas, AlphaGIS

Like It Or Not Web Applications and Mashups Will Be Hot

AJAX Programming Chris Seddon

Introduction to Web Application Development Using JEE, Frameworks, Web Services and AJAX

JavaFX. JavaFX Overview Release E

GWT and jmaki: Expanding the GWT Universe. Carla Mott, Staff Engineer, Sun Microsystems Greg Murray, Ajax Architect, Sun Microsystems

Build CA Plex Web/Mobile App

Using Adobe Flex in JSR-286 Portlets

Agenda. INTRODUCTION TO WEB DEVELOPMENT AND HTML <Lecture 1> 1/20/2013. What is a Web Developer? Rommel Anthony Palomino Spring

Google Web Toolkit (GWT) Basics. Sang Shin Java Technology Architect & Evangelist Sun Microsystems, Inc.

Discovering Computers Chapter 13 Programming Languages and Program Development

Building Mashups Using the ArcGIS APIs for FLEX and JavaScript. Shannon Brown Lee Bock

8/19/2018. Web Development & Design Foundations with HTML5. Learning Objectives (1 of 2) Learning Objectives (2 of 2) Helper Applications & Plug-Ins

Evaluation Copy. Ajax For Java Developers. If you are being taught out of this workbook, or have been sold this workbook, please call

Rich Web Applications in Server-side Java without. Plug-ins or JavaScript

Webservices In Java Tutorial For Beginners Using Netbeans Pdf

GWT - CREATE APPLICATION

Getting Started with the ArcGIS Server JavaScript API

Chapter 10 Web-based Information Systems

CNIT 129S: Securing Web Applications. Ch 3: Web Application Technologies

GWT MOCK TEST GWT MOCK TEST I

eclipse rich ajax platform (rap)

RIA Security - Broken By Design. Joonas Lehtinen IT Mill - CEO

DESIGN AND IMPLEMENTATION OF SAGE DISPLAY CONTROLLER PROJECT

Flex 3 Pre-release Tour

Adobe Flex Tutorial i

Composer Guide for JavaScript Development

So far, Wednesday, February 03, :47 PM. So far,

The Web has changed. What began as a text-based system for scientists

The goal of this book is to teach you how to use Adobe Integrated

Google Web Toolkit (GWT)

Integration Test Plan

MASTERS COURSE IN FULL STACK WEB APPLICATION DEVELOPMENT W W W. W E B S T A C K A C A D E M Y. C O M

Java EE 7 is ready What to do next? Peter Doschkinow Senior Java Architect

Google Web Toolkit for quick relief of AJAX pain. Kelly Norton & Miguel Méndez

Lesson 5: Multimedia on the Web

,

A Model-Controller Interface for Struts-Based Web Applications

Rich Web Applications in Server-side Java without. Plug-ins or JavaScript

ArcGIS for Mobile An Introduction. Bonnie Stayer

Overview of WebAdmin and UI Frameworks

AIM. 10 September

History and Backgound: Internet & Web 2.0

Working with Javascript Building Responsive Library apps

Layered UI and Adaptation Policies for Ubiquitous Web Applications

How to Install (then Test) the NetBeans Bundle

Developing Applications with Java EE 6 on WebLogic Server 12c

IBM WebSphere Application Server V3.5, Advanced Edition Expands Platform Support and Leverages the Performance of the Java 2 Software Development Kit

Abstract. 1. Introduction. 2. AJAX overview

WebApp development. Outline. Web app structure. HTML basics. 1. Fundamentals of a web app / website. Tiberiu Vilcu

Services Interoperability With Java Technology and.net: Technologies for Web 2.0

Using JavaScript on Client and Server with Project Phobos

J2EE Interview Questions

dotnettips.com 2009 David McCarter 1

LSI's VMware vcenter Plug-In: A Study in the Use of Open Source Software Erik Johannes Brian Mason LSI Corp

Google Web Toolkit. David Geary. code.google.com/webtoolkit. corewebdeveloper.com

Outline. AJAX for Libraries. Jason A. Clark Head of Digital Access and Web Services Montana State University Libraries

Vision of J2EE. Why J2EE? Need for. J2EE Suite. J2EE Based Distributed Application Architecture Overview. Umair Javed 1

A Closer Look at XPages in IBM Lotus Domino Designer 8.5 Ray Chan Advisory I/T Specialist Lotus, IBM Software Group

Mix It Up: Visual Studio 2010 and ASP.NET 4.0. Singapore 25 March 2009

HTML, XHTML, and CSS. Sixth Edition. Chapter 1. Introduction to HTML, XHTML, and

Solving Mobile App Development Challenges. Andrew Leggett & Abram Darnutzer CM First

Google Web Toolkit (GWT)

Overview of Web Application Development

Setting Up the Development Environment

Distributed Multitiered Application

THE NEW ERA OF WEB DEVELOPMENT. qooxdoo. Andreas Ecker, Derrell Lipman

Unit 4 The Web. Computer Concepts Unit Contents. 4 Web Overview. 4 Section A: Web Basics. 4 Evolution

HP UFT Web Add-in Extensibility

Performance evaluation of J2EE

Module7: AJAX. Click, wait, and refresh user interaction. Synchronous request/response communication model. Page-driven: Workflow is based on pages

This course is designed for web developers that want to learn HTML5, CSS3, JavaScript and jquery.

JAVA COURSES. Empowering Innovation. DN InfoTech Pvt. Ltd. H-151, Sector 63, Noida, UP

GWT: The Technical Advantage. Presenter: Anirudh Dewani Company Name: Google

Introduction to Ajax. Sang Shin Java Technology Architect Sun Microsystems, Inc.

Introduction to Computers and the Internet Pearson Education, Inc. All rights reserved.

AJAX Workshop. Karen A. Coombs University of Houston Libraries Jason A. Clark Montana State University Libraries

Hackveda Appsec Labs Java Programming Course and Internship Program Description:

Setup and Getting Startedt Customized Java EE Training:

CPET 581 E-Commerce & Business Technologies. Topics

ESPRIT Project N Work Package H User Access. Survey

The course also includes an overview of some of the most popular frameworks that you will most likely encounter in your real work environments.

JAVASCRIPT FOR PROGRAMMERS

Software Engineering for Ajax

Transcription:

Developing Ajax Web Apps with GWT Session I

Contents Introduction Traditional Web RIAs Emergence of Ajax Ajax ( GWT ) Google Web Toolkit Installing and Setting up GWT in Eclipse The Project Structure Running the Application

The traditional web Document oriented Web Apps Introduction ( RIAs ) Rich Internet Applications 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 ( HTML ) Hypertext Markup Language ( CSS ) Cascading Style Sheet Web Apps Web starts advancing to applications, e.g Yahoo in 1994 Communication with server through CGI (Perl ( script Forms, Javascript

Rich Internet Applications Adobe Flash and Flex ( RIAs ) 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 ( Script Netscape (ECMA 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 ( Ajax ) XML 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 Google Maps Gmail New Yahoo Mail Applications Facebook, Facebook Chat Youtube

( Toolkit GWT (Google Web 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.g oogle.gwt.sample.showcase.showcase/sho wcase.html Smart GWT showcase Rich widgets built using GWT http://www.smartclient.com/smartgwt/showca se/

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 ( http://java.sun.com/javase/downloads ) JDK 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 ( workspace (Create new project in Uncheck the Use Google App Engine (This only appears if you have installed the Google App ( Eclipse Engine plugin for 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 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. The src Folder

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.sta ndard.standard is specified to be used as the theme for this application. You may select the Chrome or Dark theme by uncommenting 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 "expanded war" 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/releasenot ( es_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.