Joel, Miguel, GWTers,

I am trying to phase in a new linker as the default GWT linker, and I could
use some feedback on how that is accomplished.

My first thought was to modify the cross-site linker in place, as was
started by this patch:

http://gwt-code-reviews.appspot.com/674802/show


After further thought, though, the changes in that patch are simply not
backward compatible. The most fundamental problem is that there are
currently linkers extending the XSLinker class, and any major change to
XSLinker will break these other ones. Additionally, the cross-site linker
has $wnd==window, but that's no longer true in the unified linker. Both of
these problems won't affect most apps, but an indeterminate few will be
broken by simply committing the above patch.

Here's an alternate phase-in plan that avoids the above two problems:

1. Make a new linker class and new linker name, so as not to disturb any
code inheriting from our existing linkers. Commit the above patch under the
new names. Anyone who can live without dev mode support can use it
immediately.

2. Add development mode support to the new linker.

3. Redirect the "std" linker to the new one. We could add a deprecated
"iframe" name for the iframe linker for anyone who desperately needs it.
Note that people using the "std" linker must already be using $wnd in the
necessary places.

4. Deprecate the iframe and xs linkers, and after a year or two remove them.
Users of the cross-site linker will need to make sure they use $wnd in the
right places before they change over.


A benefit of this approach is that most apps use the "std" linker and will
simply pick up the improvements without needing any changes. Updating people
currently on the cross-site linker is trickier, but I don't see any way to
get around the $wnd/window problem. Their code simply needs to be updated.

-Lex

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to