On Fri, Aug 29, 2008 at 3:36 AM, Ray Cromwell <[EMAIL PROTECTED]> wrote:
> Your example looks correct. I heavily 'drank the koolaid" of Overlay
> types earlier this year and have not regretted it. To the extend that
> there are areas where I'd like to use them, but can't, because of
> their inability to implement interfaces

I've consumed my fair share of kool-aid--I think overlay types are all
kinds of awesome--I just don't deal with plain JSOs much and, so far,
I've had more important things to do that refactor my few existing JSO
subclasses.  :)

> . In particular, when using Deferred Binding to wrap native browser
> objects, sometimes I need a JSO created differently for each DB. Each
> JSO is "effectively final" because only one  concrete type of the
> interface ever exists in any permutation, so theoretically it's
> possible for the JSO design to work within these restrictions, but a
> little hairy. (essentially, if type-tightening fails, you're screwed)

I participated in a discussion on the list a while ago about wishing
for the ability for JSOs to implement interfaces.  The motivating
use-case in that discussion was defining JSON messages for use on the
server, in a GWT client, and possibly elsewhere "in the cloud".
Ideally, you'd define the messages as interfaces, implement them by
hand exactly once on the server, and use deferred binding to generate
the overlay equivalent for GWT clients.  Alas, JSOs can't implement
interfaces.  I think Scott Blum might have thought the use-case was
interesting enough to merit investigation for 1.6, but I can't
remember and it's almost four in the morning here so I'm going to bed
now.

Ian

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

Reply via email to