Hi all, Thanks for expressing use cases for an @ServerOnly type annotation. I've updated Issue # and forwarded it over to Scott Blum for further review. Feel free to star the issue to keep track of updates.
Issue #3769: http://code.google.com/p/google-web-toolkit/issues/detail?id=3769 <http://code.google.com/p/google-web-toolkit/issues/detail?id=3769>Cheers, -Sumit Chandel On Thu, Sep 17, 2009 at 5:25 AM, David Given <[email protected]> wrote: > > Sripathi Krishnan wrote: > [...] > > And supposing you end up guaranteeing the above, it means you have two > > sets of functions in your class which don't speak to each other. Which > > means they have no business being together in the same class. You could > > just make a ServerSideDTO that extends from your ClientSideDTO and add > > the extra methods. > > That's not always possible. I have much the same situation, except my > DTOs themselves have a class structure. I end up having this: > > CObject > CThing > COtherThing > > SObject > SThing > SOtherThing > > ...where S classes exist on the server and C classes on the client. I > can't have SOtherThing inherit from COtherThing because it needs to > inherit from SThing and Java only supports single inheritance. > > As a result I'm having to duplicate quite a lot of logic that's needed > in both class hierarchies. There are solutions to this --- but most of > them involve creating a *third* complete class hierarchy containing the > common logic and delegating functionality to that from the S and C classes. > > This isn't a situation where the proposed @ServerOnly annotation would > help --- although I could certainly use it elsewhere --- but you should > be aware that things aren't always as simple as they first seem. You > can't make a programmer's life easier by taking tools away from them. > > -- > ┌─── dg@cowlark.com ───── http://www.cowlark.com ───── > │ > │ "They laughed at Newton. They laughed at Einstein. Of course, they > │ also laughed at Bozo the Clown." --- Carl Sagan > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
