140 likes | 259 Views
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.
E N D
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... GO-ESSP 2008
going to have oral surgery. JavaScript development is like... GO-ESSP 2008
GO-ESSP 2008 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
GO-ESSP 2008 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
GO-ESSP 2008 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(); }-*/;
GO-ESSP 2008 Used Date Widgets
GO-ESSP 2008 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
GO-ESSP 2008 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”
GO-ESSP 2008 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
GWT is more fun than oral surgery! Conclusion GO-ESSP 2008