Google Web Toolkit Stephen Bilston Stuart Johnson Eric Fath-Kolmes Ai Ci Lin Andrew Nisbet
Presentation Goals What is GWT? An overview of GWT's features. When should I use GWT? Who's using it? Finally what you can do with it? What are the risks?
What is Google Web Toolkit (GWT)? Develop Webapps using Java Compile the Java to X-browser Javascript Finally a magic bullet to fix Everything!
What's so great about it Abstracts away HTML and CSS Makes Client server communcation easy Has robust 3rd party libaraies Easy deployment
Eases Web development Lets you avoid HTML and CSS along with all there vairous oddities Many programmers already know java but don't know JavaScript, GWT moves the task of learning from new languages to what is effectively another library Writing javascript can be weird - GWT removes much of the weirdness
Makes client server comuncation easy Two easy methods: GWT-RPC Almost makes server commuincation feel like local method calls Has rather good serialization functionality Request Factory Acts like a fake ORM(Object Relational Mapping) for the client side Normal Ajax if you really want to
Has robust third party libaries Smart GWT Widgets Dual licensed Ext GWT More Widgets Dual licensed with reduced functionaliy Vaadin Widgets Server Side functionality(validation, etc)
Easy depoyment Uses Java Servlets for GWT-RPC and Request Factory Lots of options(Tomcat, JBoss etc..) If your okay with the abstraction leaking a bit you can use anything to do generic AJAX Php Ruby Perl Whatever Using java server side is an easy sell
Code Quality Concerns Debugging -With GWT, you can debug java byte code directly as it was executed in a simulated browser environment. Testing Profiling
Testing To Reveal A Bug That Has Succeeded Standard fare in traditional programming but aren’t as common in for client-side web technology. Based on Junit and on a few extensions the toolkit provides. Can be tested as Java or Javascript using the same test. GWT does the scaffolding. Java also comes with first class tooling support. - Checkstyle, FindBugs. -Advanced refactoring engines, debuggers and profilers available for standard Java programming all function normally within GWT.
Advanced Testing Concept-BenchMark A type of GWTTestcase that records the performance results. The results of all executed benchmarks are collected and stored in an XML. Report is viewable with GWT BenchMark Report Viewer. Can run multiple times tested against the possible parameter values.
Advanced Testing Concept-BenchMark /* @gwt.benchmark.param size -limit = baseRange */ public void testArrayListAdds(Integer size) { int num = size.intValue(); for (int i = 0; i < num; i++) { list.add("hello”); } }
Profiling Hosted Mode Profiling -Use any standard Java profiling you are likely accustomed to. Like Jprofile, TPTP Web Mode Profiling - Firefox Firebug -Chrome Speed Tracer
Google Chrome: Speed Tracer
Who Uses It? Google AdWords Wave Checkout Base Orkut (social networking) Mashup (deprecated. They now use Apps Engine) YesMail Enterprise Subscription based e-mail marketing app ContactOffice Contact management system
When To Use Building Rich Internet Applications Including complex websites AJAX Optimized Javascript Works on all browsers Avoid Legacy Systems
Tools Java Many IDEs available Good resources GWT specific Javadoc and examples/tutorials On Google's GWT page WYSIWYG UI Designer
GWT Designer
Simple Demo http://calcpresentation.appspot.com/
Conclusion Powerful well thought out framework Write in Java leverage developer's current tool set Debugging and profiling come to JavaScript Rules of thumb for adopting GWT: Need to put an application on the web New or emerging project or Limited legacy reliance on Collections and IO
Quake2 GWT http://code.google.com/p/quake2-gwt- port/
Recommend
More recommend