Google Web Toolkit GWT



Similar documents
Fast, Easy, Beautiful: Pick Three Building User Interfaces with Google Web Toolkit. Chris Schalk October 24, 2007

Google Web Toolkit. Progetto di Applicazioni Software a.a. 2011/12. Massimo Mecella

WA 2. GWT Martin Klíma

An introduction to creating Web 2.0 applications in Rational Application Developer Version 8.0

Google Web Toolkit (GWT) Architectural Impact on Enterprise Web Application

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

SQL-Ajax Client a Tool Managing the Database of the Google Web Toolkit Framework

Client-side Web Engineering From HTML to AJAX

Google Web Toolkit. Introduction to GWT Development. Ilkka Rinne & Sampo Savolainen / Spatineo Oy

Enterprise Application Development In Java with AJAX and ORM

Introduction to the. Barracuda Embedded Web-Server

LabVIEW Internet Toolkit User Guide

Example. Represent this as XML

Getting Started Guide with WIZ550web

Performance Testing for Ajax Applications

Google Web Toolkit. Peter Norrhall

Preface. Motivation for this Book

PROFESSIONAL. Node.js BUILDING JAVASCRIPT-BASED SCALABLE SOFTWARE. Pedro Teixeira WILEY. John Wiley & Sons, Inc.

The Google Web Toolkit (GWT): Declarative Layout with UiBinder Basics

Java 7 Recipes. Freddy Guime. vk» (,\['«** g!p#« Carl Dea. Josh Juneau. John O'Conner

place/business fetch details, removefromfavorite () function, 189 search button handler bind, B BlackBerry build environment

Rich Internet Applications

How To Test Your Web Site On Wapt On A Pc Or Mac Or Mac (Or Mac) On A Mac Or Ipad Or Ipa (Or Ipa) On Pc Or Ipam (Or Pc Or Pc) On An Ip

Web [Application] Frameworks

How To Write A Web Server In Javascript

Client-Side Web Programming (Part 2) Robert M. Dondero, Ph.D. Princeton University

Developing a Web Server Platform with SAPI Support for AJAX RPC using JSON

Rich User Interfaces for Web-Based Corporate Applications

Operational Decision Manager Worklight Integration

HTML Form Widgets. Review: HTML Forms. Review: CGI Programs

XML nyelvek és alkalmazások

An introduction to creating JSF applications in Rational Application Developer Version 8.0

AJAX and JSON Lessons Learned. Jim Riecken, Senior Software Engineer, Blackboard Inc.

Progressive Enhancement With GQuery and GWT. Ray Cromwell

An Overview of Java. overview-1

Web application Architecture

AUTOMATED CONFERENCE CD-ROM BUILDER AN OPEN SOURCE APPROACH Stefan Karastanev

TCP/IP Networking, Part 2: Web-Based Control

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

by LindaMay Patterson PartnerWorld for Developers, AS/400 January 2000

JavaScript: Client-Side Scripting. Chapter 6

Front-End Performance Testing and Optimization

Introducing Apache Pivot. Greg Brown, Todd Volkert 6/10/2010

Adding Panoramas to Google Maps Using Ajax

Getting Started with the Internet Communications Engine

Web-JISIS Reference Manual

Accessing Data with ADOBE FLEX 4.6

Introduction to Ingeniux Forms Builder. 90 minute Course CMSFB-V6 P

MASTERTAG DEVELOPER GUIDE

Generating Test Cases With High Branch Coverage for Web Applications

How To Write An Ria Application

Eclipse Web Tools Platform. Naci Dai (Eteration), WTP JST Lead

Ajax Design and Usability

A Sane Approach to Modern Web Application Development. Adam Chlipala February 22, 2010

Web Development using PHP (WD_PHP) Duration 1.5 months

Building a Multi-Threaded Web Server

Java Interview Questions and Answers

JSP Java Server Pages

Types of Cloud Computing

CS506 Web Design and Development Solved Online Quiz No. 01

Web Application Development

The Google Web Toolkit (GWT): Overview & Getting Started

Pemrograman Dasar. Basic Elements Of Java

WebObjects Web Applications Programming Guide. (Legacy)

Selenium Automation set up with TestNG and Eclipse- A Beginners Guide

Web Applications Testing

Mobile development with Apache OFBiz. Ean Schuessler, Brainfood

CS 111 Classes I 1. Software Organization View to this point:

If you wanted multiple screens, there was no way for data to be accumulated or stored

CommonSpot Content Server Version 6.2 Release Notes

Blackbox Reversing of XSS Filters

Web Programming Step by Step

Oracle Forms 12c Change Begins Here

ultimo theme Update Guide Copyright Infortis All rights reserved

Ajax Development with ASP.NET 2.0

socketio Documentation

4.2 Understand Microsoft ASP.NET Web Application Development

The Google Web Toolkit (GWT): The Model-View-Presenter (MVP) Architecture Official MVP Framework

Shipbeat Magento Module. Installation and user guide

Web Translation. Web Developer Guide v v10.5.0

ASP.NET Using C# (VS2012)

IBM SDK, Java Technology Edition Version 1. IBM JVM messages IBM

N CYCLES software solutions. XML White Paper. Where XML Fits in Enterprise Applications. May 2001

Design and Functional Specification

Mojolicious. Marcos Rebelo

J j enterpririse. Oracle Application Express 3. Develop Native Oracle database-centric web applications quickly and easily with Oracle APEX

Pay with Amazon Integration Guide

T320 E-business technologies: foundations and practice

Check list for web developers

Tiers of Web Programming - case of weborigami - Tetsuo Ida Department of Computer Science University of Tsukuba Japan

XML & Databases. Tutorial. 2. Parsing XML. Universität Konstanz. Database & Information Systems Group Prof. Marc H. Scholl

Pre-authentication XXE vulnerability in the Services Drupal module

Programming IoT Gateways With macchina.io

Alfresco. Wiley Publishing, Inc. PROFESSIONAL. PRACTICAL SOLUTIONS FOR ENTERPRISE. John Newton CONTENT MANAGEMENT. Michael Farman Michael G.

VIRTUAL LABORATORY: MULTI-STYLE CODE EDITOR

Cache Configuration Reference

Fundamentals of Java Programming

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

WIRIS quizzes web services Getting started with PHP and Java

Struts Tools Tutorial. Version: M5

Transcription:

THE INTERNET,mapped on the opposite page, is a scalefree network in that Google Web Toolkit dis.'~tj port,from BYALBERTU\SZLOBARABASI ANDERICBONABEAU THE INTERNET,mapped on the opposite page, is a scalefree network in that 2 BYALBERTU\SZLOBARABASI ANDERICBONABEAU GWT Java fejleszt! környezet AJAX alkalmazások kliens oldali komponensének fejlesztésére felhasználói felület (widgetek) aszinkron RPC history menedzsment, bookmarking

THE INTERNET,mapped on the opposite page, is a scalefree network in that 3 GWT BYALBERTU\SZLOBARABASI ANDERICBONABEAU GWT compiler Java > JavaScript Hosted mode embedded browser window, JVM Web mode JavaSript, html normál browser GWT runtime library Java runtime library emuláció THE INTERNET,mapped on the opposite page, is a scalefree network in that 4 Fejlesztési folyamat BYALBERTU\SZLOBARABASI ANDERICBONABEAU Java kód editálás pl. Eclipse Java kód debuggolás Hosted mode vizuális debuggolás Fordítás JavaScriptre tesztelés browserben

THE INTERNET,mapped on the opposite page, is a scalefree network in that 5 Java támogatás BYALBERTU\SZLOBARABASI ANDERICBONABEAU byte, char, short, int, long (float), float, double, Object, String try, catch, finally JavaScript interpreterek egyszálúak java.lang, java.utils THE INTERNET,mapped on the opposite page, is a scalefree network in that 6 com.google.gwt.core.client Packages Fundamental classes used in clientside GWT code. com.google.gwt.core.ext com.google.gwt.core.ext.typeinfo com.google.gwt.http.client com.google.gwt.i18n.client com.google.gwt.json.client com.google.gwt.junit.client Classes used to extend the GWT compiler. Typeintrospection support classes used by generators. Provides the clientside classes and interfaces for making HTTP requests and processing the associated responses. Internationalization support for GWT applications. Classes for parsing and creating JSON encoded values. Classes and modules used in building JUnit tests. com.google.gwt.user.client com.google.gwt.user.client.rpc BYALBERTU\SZLOBARABASI ANDERICBONABEAU com.google.gwt.user.client.ui com.google.gwt.user.server.rpc com.google.gwt.xml.client Fundamental userinterface classes used in clientside GWT code. Classes used in clientside implementation of remote procedure calls. Widgets, Panels, and other userinterface classes. Classes used in serverside implementation of remote procedure calls. Basic classes used in XML DOM parsing and XML document generation.

THE INTERNET,mapped on the opposite page, is a scalefree network in that 7 com.google.gwt.core.client BYALBERTU\SZLOBARABASI ANDERICBONABEAU EntryPoint interfész public void onmoduleload() modul belépési pont THE INTERNET,mapped on the opposite page, is a scalefree network in that 8 BYALBERTU\SZLOBARABASI ANDERICBONABEAU com.google.gwt.http.client Kliens oldali http kérések és válasz feldolgozás Request cancel(), ispending() RequestBuilder RequestBuilder(RequestBuilder.Method httpmethod, String url) public Request sendrequest(string requestdata, RequestCallback callback) RequestCallback onerror(request, Throwable) onresponsereceived(request, Response) Response getheaders() getstatuscode() gettext()

THE INTERNET,mapped on the opposite page, is a scalefree network in that 9 GET példa public class GetExample implements EntryPoint { public static final int STATUS_CODE_OK = 200; public static void doget(string url) { RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, url); try { Request response = builder.sendrequest(null, new RequestCallback() { public void onerror(request request, Throwable exception) { // Code omitted for clarity public void onresponsereceived(request request, Response response) { // Code omitted for clarity ); catch (RequestException e) { // Code omitted for clarity BYALBERTU\SZLOBARABASI ANDERICBONABEAU public void onmoduleload() { doget("/"); THE INTERNET,mapped on the opposite page, is a scalefree network in that 10 com.google.gwt.json.client BYALBERTU\SZLOBARABASI ANDERICBONABEAU JSONParser JSONValue JSONArray, JSONBoolean, JSONNull, JSONNumber, JSONObject, JSONString

THE INTERNET,mapped on the opposite page, is a scalefree network in that 11 JSON példa private class JSONResponseTextHandler implements ResponseTextHandler { public void oncompletion(string responsetext) { try { JSONValue jsonvalue = JSONParser.parse(responseText); displayjsonobject(jsonvalue); catch (JSONException e) { displayerror(responsetext); searchbutton.settext(search_button_default_text);... private void displayjsonobject(jsonvalue jsonvalue) { jsontree.removeitems(); jsontree.setvisible(true); ;i~e~tu"eg~ye'l"rne(;lb9.$ha redorganili TreeItem ngprincipies. treeitem = jsontree.additem("json Response"); addchildren(treeitem, jsonvalue); drugdevelopmentto InternetreeItem.setStyleName("JSONJSONResponseObject"); security treeitem.setstate(true); BYALBERTU\SZLOBARABASI ANDERICBONABEAU... private void addchildren(treeitem treeitem, JSONValue jsonvalue) { JSONArray jsonarray; JSONObject jsonobject; JSONString jsonstring; if ((jsonarray = jsonvalue.isarray())!= null) { for (int i = 0; i < jsonarray.size(); ++i) { TreeItem child = treeitem.additem(getchildtext("[" + Integer.toString(i) + "]")); addchildren(child, jsonarray.get(i)); else if ((jsonobject = jsonvalue.isobject())!= null) { Set keys = jsonobject.keyset(); for (Iterator iter = keys.iterator(); iter.hasnext();) { String key = (String) iter.next(); TreeItem child = treeitem.additem(getchildtext(key)); addchildren(child, jsonobject.get(key)); else if ((jsonstring = jsonvalue.isstring())!= null) { // Use stringvalue instead of tostring() because we don't want escaping treeitem.additem(jsonstring.stringvalue()); else { // JSONBoolean, JSONNumber, and JSONNull work well with tostring(). treeitem.additem(getchildtext(jsonvalue.tostring())); THE INTERNET,mapped on the opposite page, is a scalefree network in that 12 CommandCanceledException com.google.gwt.user.client osztályok Exception reported to the current UncaughtExceptionHandler when a deferred Command is canceled as a result of a slow script warning. Cookies DeferredCommand DOM Element Event Provides access to browser cookies stored on the client. This class allows you to execute code after all currently pending event handlers have completed, using the addcommand(command) or addcommand(incrementalcommand) methods. This class provides a set of static methods that allow you to manipulate the browser's Document Object Model (DOM). An opaque handle to a native DOM Element. An opaque handle to a native DOM Event. History This class allows you to interact with the browser's history stack. HTTPRequest IncrementalCommandCanceledException BYALBERTU\SZLOBARABASI ANDERICBONABEAU Random This class allows you to make asynchronous HTTP requests to the originating server. Exception reported to the current UncaughtExceptionHandler when a deferred IncrementalCommand is canceled as a result of a slow script warning. This class can be used as a substitute for Random. Timer A simplified, browsersafe timer class. Window This class provides access to the browser window's methods, properties, and events.

THE INTERNET,mapped on the opposite page, is a scalefree network in that 13 History példa public class HistoryExample implements EntryPoint, HistoryListener { private Label lbl = new Label(); public void onmoduleload() { // Create three hyperlinks that change the application's history. Hyperlink link0 = new Hyperlink("link to foo", "foo"); Hyperlink link1 = new Hyperlink("link to bar", "bar"); Hyperlink link2 = new Hyperlink("link to baz", "baz"); // If the application starts with no history token, start it off in the // 'baz' state. String inittoken = History.getToken(); if (inittoken.length() == 0) inittoken = "baz"; // onhistorychanged() is not called when the application first runs. Call // it now in order to reflect the initial state. onhistorychanged(inittoken); BYALBERTU\SZLOBARABASI ANDERICBONABEAU // Add widgets to the root panel. VerticalPanel panel = new VerticalPanel(); panel.add(lbl); panel.add(link0); panel.add(link1); panel.add(link2); RootPanel.get().add(panel); // Add history listener History.addHistoryListener(this); public void onhistorychanged(string historytoken) { // This method is called whenever the application's history changes. Set // the label to reflect the current history token. lbl.settext("the current history token is: " + historytoken); THE INTERNET,mapped on the opposite page, is a scalefree network in that 14 Timer példa public class TimerExample implements EntryPoint, ClickListener { public void onmoduleload() { Button b = new Button("Click and wait 5 seconds"); b.addclicklistener(this); RootPanel.get().add(b); BYALBERTU\SZLOBARABASI ANDERICBONABEAU public void onclick(widget sender) { // Create a new timer that calls Window.alert(). Timer t = new Timer() { public void run() { Window.alert("Nifty, eh?"); ; // Schedule the timer to run once in 5 seconds. t.schedule(5000);

THE INTERNET,mapped on the opposite page, is a scalefree network in that com.google.gwt.user.client 15 interfészek Command Encapsulates an action for later execution, often from a different context. EventListener EventPreview Receives lowlevel browser events. A listener interface for previewing browser events. HistoryListener Implement this interface to receive notification of changes to the browser history state. IncrementalCommand ResponseTextHandler BYALBERTU\SZLOBARABASI ANDERICBONABEAU WindowCloseListener An IncrementalCommand is a command that is broken into one or more substeps, each substep brings the whole command nearer to completion. Implement this interface to receive HTTP completion events. Implement this interface to receive closing events from the browser window. WindowResizeListener Implement this interface to receive resize events from the browser window. THE INTERNET,mapped on the opposite page, is a scalefree network in that 16 GWT RPC BYALBERTU\SZLOBARABASI ANDERICBONABEAU

THE INTERNET,mapped on the opposite page, is a scalefree network in that 17 com.google.gwt.user.server.rpc és com.google.gwt.user.client.rpc BYALBERTU\SZLOBARABASI ANDERICBONABEAU Szerver oldali RPC szolgáltatások implementálására szolgáló osztályok Kliens oldali RPC implementáció aszinkron callback interfész THE INTERNET,mapped on the opposite page, is a scalefree network in that 18 RPC implementáció Kliens oldal Szerver oldal public interface MyService extends RemoteService { public String mymethod(string s); interface MyServiceAsync { public void mymethod(string s, AsyncCallback callback); MyService.myMethod(s, new AsyncCallback() { public void onsuccess(object result) { // It's always safe to downcast to the known return type. public void onfailure(throwable caught) { // Convenient way to find out which exception was thrown. try { throw caught; catch (IncompatibleRemoteServiceException e) { BYALBERTU\SZLOBARABASI ANDERICBONABEAU // this client is not compatible with the server; cleanup and refresh the // browser catch (InvocationException e) { // the call didn't complete cleanly catch (Throwable e) { // last resort a very unexpected exception ); public interface MyService extends RemoteService { public String mymethod(string s); public class MyServiceImpl extends RemoteServiceServlet implements MyService { public String mymethod(string s) { // Do something interesting with 's' here on the server. return s;

THE INTERNET,mapped on the opposite page, is a scalefree network in that 19 com.google.gwt.user.client.ui Felhasználói felületelem osztályok és interfészek BYALBERTU\SZLOBARABASI ANDERICBONABEAU THE INTERNET,mapped on the opposite page, is a scalefree network in that 20 com.google.gwt.user.client.ui (folyt.) BYALBERTU\SZLOBARABASI ANDERICBONABEAU

THE INTERNET,mapped on the opposite page, is a scalefree network in that 21 Attr com.google.gwt.xml.client XML DOM parszolás és XML dokumentum generálás browser XML támogatásának használata Attr objects represent keyvalue pairs of attributes on Element objects. CDATASection CharacterData Comment Document DocumentFragment Element EntityReference drugdevelopmentto Internet NamedNodeMap security BYALBERTU\SZLOBARABASI ANDERICBONABEAU Node NodeList ProcessingInstruction This node represents escaped character sequences. This interface describes CharacterData XML nodes. This interface describes comment XML nodes. Document objects represent XML documents. A DocumentFragment is a basket into which one may place other Node objects for future processing. This interface represents XML DOM elements, which are the basic building block of XML. This interface represents entity references, such as &foo;. Represents a stringtonode map, used in getattributes. This is the base interface for DOM nodes, as obtained from using XMLParser methods. This interface represents an immutable ordered collection of nodes. This interface documents the ProcessingInstruction node type. Text This interface describes text nodes, as might occur between tags. Hello World 22 THE INTERNET,mapped on the opposite page, is a scalefree network in that number of connections to other sites. This map, made on February 6, 2003, HTML dok. <html>! <head>!! <title>hello</title>! </head>! <body bgcolor="white">!! <script language="javascript" src="com.google.gwt.sample.hello.hello.nocache.js"></script>! </body> </html> BYALBERTU\SZLOBARABASI ANDERICBONABEAU

THE INTERNET,mapped on the opposite page, is a scalefree network in that number of connections to other sites. This map, made on February 6, 2003, Java kód 23 Hello World (folyt.) package com.google.gwt.sample.hello.client; import com.google.gwt.core.client.entrypoint; import com.google.gwt.user.client.window; import com.google.gwt.user.client.ui.button; import com.google.gwt.user.client.ui.clicklistener; import com.google.gwt.user.client.ui.rootpanel; import com.google.gwt.user.client.ui.widget; /** * HelloWorld application. */ public class Hello implements EntryPoint { BYALBERTU\SZLOBARABASI ANDERICBONABEAU public void onmoduleload() { Button b = new Button("Click me", new ClickListener() { public void onclick(widget sender) { Window.alert("Hello, AJAX"); ); RootPanel.get().add(b); THE INTERNET,mapped on the opposite page, is a scalefree network in that 24 Hello World (folyt.) BYALBERTU\SZLOBARABASI ANDERICBONABEAU Hosted mode Browser mode

THE INTERNET,mapped on the opposite page, is a scalefree network in that 25 Szerszámok projectcreator Generate an Ant buildfile and/or Eclipse project. applicationcreator junitcreator Generate a starter application, including launch scripts. Generate a JUnit test for an existing project. i18ncreator Generate an i18n properties file and synchronization script for an existing project. benchmarkviewer Displays benchmark results. <modulename>compile BYALBERTU\SZLOBARABASI ANDERICBONABEAU <modulename>shell Compile the Java code in the named module into JavaScript. This script is created by applicationcreator. Run the named module in Hosted Mode. This script is created by applicationcreator.