Faster-than-Possible Code: Deferred Binding with GWT

Bruce Johnson (Google)

What do you do when you want the benefits of modularity and abstraction during development, but you aren't willing to subject users with any runtime overhead to get it? If you're the GWT team, you invent deferred binding. Deferred binding is a pluggable compile-time type substitution and code generation mechanism. This unique approach to program modularization provides many of the benefits of Java reflection and dynamic class loading without compromising the GWT compiler's ability to optimize the heck out of your code.

In this Code Lab, we'll examine how the GWT libraries leverage deferred binding and GWT compiler optimizations to provide zero-overhead browser abstractions, highly optimized internationalization, automatic image bundling, and high-performance, polymorphic RPC. Did we mention that deferred binding is extensible? We'll also use deferred binding to create a new library from scratch.

Presentation Slides