SLIDE 1
Google Web Toolkit Stephen Bilston Stuart Johnson Eric Fath-Kolmes - - PowerPoint PPT Presentation
Google Web Toolkit Stephen Bilston Stuart Johnson Eric Fath-Kolmes - - PowerPoint PPT Presentation
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
SLIDE 2
SLIDE 3
What is Google Web Toolkit (GWT)?
Develop Webapps using Java Compile the Java to X-browser Javascript Finally a magic bullet to fix Everything!
SLIDE 4
What's so great about it
Abstracts away HTML and CSS Makes Client server communcation easy Has robust 3rd party libaraies Easy deployment
SLIDE 5
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
SLIDE 6
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
SLIDE 7
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)
SLIDE 8
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
SLIDE 9
Code Quality Concerns
Debugging
- With GWT, you can debug java byte code directly
as it was executed in a simulated browser environment. Testing Profiling
SLIDE 10
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.
SLIDE 11
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.
SLIDE 12
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”); } }
SLIDE 13
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
SLIDE 14
Google Chrome: Speed Tracer
SLIDE 15
SLIDE 16
SLIDE 17
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
SLIDE 18
SLIDE 19
SLIDE 20
When To Use
Building Rich Internet Applications Including complex websites AJAX Optimized Javascript Works on all browsers Avoid Legacy Systems
SLIDE 21
Tools
Java Many IDEs available Good resources GWT specific Javadoc and examples/tutorials On Google's GWT page WYSIWYG UI Designer
SLIDE 22
GWT Designer
SLIDE 23
Simple Demo
http://calcpresentation.appspot.com/
SLIDE 24
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
SLIDE 25