GWT Conference: Deferred Binding with Ray Cromwell

Ray Cromwell is the CTO of Timepedia, makers of the mega cool Chronoscope. Now we get into the meat of GWT with deferred binding. This area isn't that well documented (though GWT in Action goes cover it a bit).

I won't try to recap Ray's presentation. You can check out his posts, GWT Demystified: Generators (parts one, two, three and erratum) which shows how to expose GWT Pojo's to JavaScript without having to use the messy Ljava/lang/String stuff. He also promised to put a tutorial based on his talk up on his blog. I'll post a link when he does.

There are two types of deferred binding -- Replacement and Generation. If you've used the DOM class, you've used replacement. There are DOMImpl classes for each major browser versions. These replacements account for the typical 4 JavaScript files that GWT produces. If you add internationalization, you will generate even more (4 browsers, 6 languages = 24 JavaScript files). For a little bit of extra disk space, you get JavaScript files that are optimized for a particular language/browser combination. No extra data or code.

Generation gives you, essentially, reflection and code generation (meta programming) at compile time. GWT-RPC, for example, uses generators to...wait for it...generate code to implement the RPC serialization, deserialization, etc.

OK, some Ray Cromwell quotes:

"The Compiler can't optimize code that it hasn't seen."

"The key to deferred bindings is understanding all of the undocumented commands in the Module file."

For more on GWT and deferred binding, see the Rocket-GWT Generator doc.

Technorati Tags: , ,

Related posts:

  1. GWT Conference: Voices That Matter Summary
  2. ZK and Data Binding
  3. GWT Conference: Tools Panel
  4. GWT Conference, Day 3
  5. GWT Conference: Final Q&A

Topics:

Leave a comment

Powered by WP Hashcash

Launch: Pathfinder Newsletter

    Get a monthly update on best practices for delivering successful software.

    Subscribe via email


    Subscribe via RSS      RSS icon

Topics

Search

WordPress

Comments about this site: info@pathf.com