google web toolkit

32
GWT GWT Google Web Google Web Toolkit Toolkit Tech Z‘Nüni Brief Tech Z‘Nüni Brief #1 #1 TOC Intro Advantages / What is it ? The compiler Live sample Components Idea Project and Plugin Appendix .. ?

Upload: chris-be

Post on 22-Dec-2014

3.302 views

Category:

Business


2 download

DESCRIPTION

GWT - Google Web Toolkit tutorial, walk through

TRANSCRIPT

Page 1: Google Web Toolkit

GWTGWT

Google Web ToolkitGoogle Web ToolkitTech Z‘Nüni Brief #1Tech Z‘Nüni Brief #1

TOC

IntroAdvantages / What is it ?The compilerLive sampleComponentsIdea Project and PluginAppendix.. ?

Page 2: Google Web Toolkit

Intro

Page 3: Google Web Toolkit

AdvantagesGWT • Web 2.0• Java-to-JavaScript compiler• Debugger

Basic procedure:

Page 4: Google Web Toolkit

Build a Project

Page 5: Google Web Toolkit

Build a Project

Page 6: Google Web Toolkit

Build a Project

Click!

Page 7: Google Web Toolkit

Build a ProjectClick!

Page 8: Google Web Toolkit

Build a ProjectCrypty Files: for each Locale and Browser Type

Page 9: Google Web Toolkit

Compatible Clients

Page 10: Google Web Toolkit

Samples• First Impression– Dyna Table – Kitchen Sink (Lists, Popups)– Simple Xml (Formating Xml)– Mail

Page 11: Google Web Toolkit

Components

Page 12: Google Web Toolkit

GWT CompilerThree style modes:1.Obfuscate (compact)

2.Pretty (methods)

3.Detailed (meth. & qualified class name)e.g. function java_lang_Object_toString__(){…

Page 13: Google Web Toolkit

GWT CompilerBytecode won‘t work !→ Needs alle Java classes

as Sourcecode JRE 3 Party Jars

Page 14: Google Web Toolkit

GWT Compiler• Code must be Java 1.4 syntax

compatible(can change in the future)

• Compiler generates for every:– Browser type– Locale

→ separate script• Bootstrap- script

Advantage:• minimize Bandwidth• Browser doesn‘t parse any used script code.

Page 15: Google Web Toolkit

JSNIJava Script Native Interface

+ Browser API+ Super cool 3p Javascript

LibraryBasically JSNI can do callsfrom Java -> JS -> Java

Page 16: Google Web Toolkit

JSNIBasically JSNI can do calls From:

JS JavaJSNI

Page 17: Google Web Toolkit

JRE EmulationEmulator differs slightly

from Java Impl.– Java.lang.*– Java.util.*

(basically: Datatypes, Exceptions, Collections)

Page 18: Google Web Toolkit

i18nTwo mechanisms

Page 19: Google Web Toolkit

Remote Procedure CallsPrivides two tools

Strings/ Xml Method invoke

Page 20: Google Web Toolkit

XML ParserDOM based XML Parser

Page 21: Google Web Toolkit

History

addHistoryListener *

newItem(token:String)

HistoryonHistoryChanged(t

oken:String)

HistoryListener

onHistoryChanged(token:String)

HistoryListenerImpl

Definition: Token = Keywort that defines the Content changed

History

Page 22: Google Web Toolkit

JUnit

Test Framework

Page 23: Google Web Toolkit

GWT Plugin

Goto

SettingsIDE SettingsGoogle Web Toolkit

IDE Plugin in IDEA

Page 24: Google Web Toolkit

GWT and IDEAQuick steps through a IDEA Sample Project

Page 25: Google Web Toolkit

GWT and IDEA

(Descriptor)

Page 26: Google Web Toolkit

GWT and IDEA

(Hooks)

(History)

(Boot strap)

(Entry point)

Page 27: Google Web Toolkit

GWT and IDEA(RemoteInterface for Client)

Page 28: Google Web Toolkit

GWT and IDEA(EntryPoint)

Page 29: Google Web Toolkit

GWT and IDEA(RemoteInterface on Server)

Page 30: Google Web Toolkit

GWT and IDEA

(Implementation of Interface)

Page 31: Google Web Toolkit

Appendix• Home:

http://code.google.com/webtoolkit/

• FAQ‘s: http://code.google.com/webtoolkit/faq.html

• Download:http://code.google.com/webtoolkit/download.html

• Other sites: http://www.gwtwidget.com/

Page 32: Google Web Toolkit

Fragen

..?..?