Google Web Toolkit
description
Transcript of 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.. ?
Intro
AdvantagesGWT • Web 2.0• Java-to-JavaScript compiler• Debugger
Basic procedure:
Build a Project
Build a Project
Build a Project
Click!
Build a ProjectClick!
Build a ProjectCrypty Files: for each Locale and Browser Type
Compatible Clients
Samples• First Impression– Dyna Table – Kitchen Sink (Lists, Popups)– Simple Xml (Formating Xml)– Mail
Components
GWT CompilerThree style modes:1.Obfuscate (compact)
2.Pretty (methods)
3.Detailed (meth. & qualified class name)e.g. function java_lang_Object_toString__(){…
GWT CompilerBytecode won‘t work !→ Needs alle Java classes
as Sourcecode JRE 3 Party Jars
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.
JSNIJava Script Native Interface
+ Browser API+ Super cool 3p Javascript
LibraryBasically JSNI can do callsfrom Java -> JS -> Java
JSNIBasically JSNI can do calls From:
JS JavaJSNI
JRE EmulationEmulator differs slightly
from Java Impl.– Java.lang.*– Java.util.*
(basically: Datatypes, Exceptions, Collections)
i18nTwo mechanisms
Remote Procedure CallsPrivides two tools
Strings/ Xml Method invoke
XML ParserDOM based XML Parser
History
addHistoryListener *
newItem(token:String)
HistoryonHistoryChanged(t
oken:String)
HistoryListener
onHistoryChanged(token:String)
HistoryListenerImpl
Definition: Token = Keywort that defines the Content changed
History
JUnit
Test Framework
GWT Plugin
Goto
SettingsIDE SettingsGoogle Web Toolkit
IDE Plugin in IDEA
GWT and IDEAQuick steps through a IDEA Sample Project
GWT and IDEA
(Descriptor)
GWT and IDEA
(Hooks)
(History)
(Boot strap)
(Entry point)
GWT and IDEA(RemoteInterface for Client)
GWT and IDEA(EntryPoint)
GWT and IDEA(RemoteInterface on Server)
GWT and IDEA
(Implementation of Interface)
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/
Fragen
..?..?