2008.5.17 馮馮馮
2008.5.17 馮彥文
About Me 馮彥文 a.k.a Tempo
Twitter: tempofeng Blog: run, tempo, run (google: tempo) Liquable Inc: [email protected]
活動 Happyweb: http://happyweb.tw Java User Group: http://www.javaworld.com.tw
Agenda GWT & Features Communicate With Others Systems,
Frameworks Pitfalls
Google Web Toolkit
Writing AJAX Applications in
Java
CSS
GWT Class Library
JavaScriptGWT
Compiler
Java Source Code
Module.xml
EntryPoint
HTML
Hello World Demo
Swing, SWT Like Programming
Model
Components,Containers,Events, …
Composite Widget
Widget Demo
Hosted Mode /No-Server Mode
No-Server Mode Demo
Scalability
Stateless Servers,
Stateful Clients
Business Logic as Well
History Management
History Demo
JUnit Integration
Open Source(Apache 2.0 License)
Comparison DWR
Best for communicating with Java server, No UI components
Dojo Hard, less document but powerful
Ext-js Nice UI, less document, license issue
Jquery No UI components
Communication With Others Systems,
Frameworks
GWT Scripts Can Be Used as
XSS
Client
GWT-RPC Server 2
WEB Server
GWT-RPC Server 1
RPC HTTP
RequestBuilder GWT-RPC
Easy for Java servers JSON Rest (XML)
JavaScripts JavaScript Native Interface (JSNI) GWT-API-Interop
http://code.google.com/p/gwt-api-interop/
Web Pages gwt-params
Pitfalls
Value Objects
Hibernate Obj (PersistList,
…)
Value Obj
Value Obj(JavaScript)
GWT JavaScript
Tranform
GWT-RPC
Use
Java
JavaScript
Value Objects Same as other serialization framework Data-binding
Hibernate4get http://hibernate4gwt.sourceforge.net/
XSTM http://www.xstm.net/
SEO? Decorate output page, don’t cloak
SEO? Based on GWT Output
Project Structure
Gwt-maven http://code.google.com/p/gwt-maven/
Copy generated JavaScript to src in webapp
Page Layout
VerticalContainer, HorizontalContain
er Are Using Tables
JDK 1.4 Only For client codes only Wait for GWT 1.5
Missing Classes Reflection GWTx
http://code.google.com/p/gwtx/ Gwittir
http://code.google.com/p/gwittir/
Thank You!