contrasting styles of web ui development: gwt vs native javascript

14
Contrasting styles of Web UI Development: GWT vs Native JavaScript Roland Schweitzer Weathertop Consulting, LLC Jeremy Malczyk JISAO

Upload: frayne

Post on 08-Jan-2016

35 views

Category:

Documents


2 download

DESCRIPTION

Roland Schweitzer Weathertop Consulting, LLC Jeremy Malczyk JISAO. Contrasting styles of Web UI Development: GWT vs Native JavaScript. going to hear a symphony. GWT development is like. going to have oral surgery. JavaScript development is like. IDE Tools. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Contrasting styles of Web UI Development: GWT vs Native JavaScript

Contrasting styles of Web UI Development: GWT vs

Native JavaScript

Roland SchweitzerWeathertop Consulting, LLC

Jeremy Malczyk JISAO

Page 2: Contrasting styles of Web UI Development: GWT vs Native JavaScript

GO-ESSP 2008 2

GWT development is like...

going to hear a symphony.

Page 3: Contrasting styles of Web UI Development: GWT vs Native JavaScript

GO-ESSP 2008 3

JavaScript development is like...

going to have oral surgery.

Page 4: Contrasting styles of Web UI Development: GWT vs Native JavaScript

GO-ESSP 2008 4

Page 5: Contrasting styles of Web UI Development: GWT vs Native JavaScript

GO-ESSP 2008 5

Page 6: Contrasting styles of Web UI Development: GWT vs Native JavaScript

GO-ESSP 2008 6

Page 7: Contrasting styles of Web UI Development: GWT vs Native JavaScript

GO-ESSP 2008 7

IDE Tools

Special “hosted” browser that runs the native Java for development and testing in the IDE

Debug client and server in the same IDE Cross-compiler that compiles and optimized the

Java into JavaScript targeted to a suite of common browsers

Deploys as regular web page with JavaScript references on any Web server

Page 8: Contrasting styles of Web UI Development: GWT vs Native JavaScript

GO-ESSP 2008 8

Extensive Widget Library

Many widgets (including maps) Widgets are easy to combine into reusable

composite widgets Listeners can “bubble up” clicks through the widget

stack so clicks can be handled at the top level

Page 9: Contrasting styles of Web UI Development: GWT vs Native JavaScript

GO-ESSP 2008 9

Reuse Existing JavaScript

“Overlay” a Java type on existing JavaScript code Similar in concept to JNI in fact they call it JSNI

public class LASDateWidget extends JavaScriptObject {

protected LASDateWidget(){}

public final native String getDateLo()

/*-{ return this.getDateLo(); }-*/;

Page 10: Contrasting styles of Web UI Development: GWT vs Native JavaScript

GO-ESSP 2008 10

Used Date Widgets

Page 11: Contrasting styles of Web UI Development: GWT vs Native JavaScript

GO-ESSP 2008 11

Reuse or adapt AJAX RPC Consume existing XML or JSON server responses Build or adapt services to use GWT RPC

It was so easy, I adapted our services to use native RPC Once the serializable container was written I could use it

on both the server and the client Didn’t have to use native JavaScript that I am too

impatient to understand and didn’t have to parse the JSON into a new client-side object

Page 12: Contrasting styles of Web UI Development: GWT vs Native JavaScript

GO-ESSP 2008 12

Leverage Existing LAS Capabilities

AJAX request/responses already available to discover data sets, variables, grids, operations and options

Needed to add a way to group “data sets” (a single netCDF file) into collections that and to identify the group as special (candidate for the TimeSeries) interface.

group_name = “Channel Islands – Santa Rosa” group_type=”time_series”

Page 13: Contrasting styles of Web UI Development: GWT vs Native JavaScript

GO-ESSP 2008 13

Leverage...

Existing tool (with new group parameters) consumes THREDDS catalogs which have collected the netCDF files into logical groupings and returns LAS configuration XML

Existing operation and options for plotting time series

Can add more from existing operation as needed or add new operations

Page 14: Contrasting styles of Web UI Development: GWT vs Native JavaScript

GO-ESSP 2008 14

Conclusion

GWT is more fun than oral surgery!