Re: Limiting serializable types in RPC

2009-12-14 Thread Paul Robinson
Unfortunately, java best practice differs from GWT best practice in this
area. Standard advice for GWT is to make your RPC APIs as type-specific
as possible.

Luis Fernando Planella Gonzalez wrote:
> Is there a way (it would be nice if there were one) to exclude types
> from RPC?
> Here's the concrete use case: In our project, the RemoteService
> interfaces are defined in a separate project as the web layer. And all
> methods / parameters use the Java best practices: always reference
> collections by it's interface.
> However, having a method to return Collection, for example,
> generates code to handle Vector, ArrayList, LinkedList, HashSet,
> LinkedHashSet...
> As interfaces are in a separated project, and it would be messy and
> make maintenance harder to change all interfaces to a given
> implementation...
> If I know I ALWAYS return ArrayLists or HashSets, is there a way to
> blacklist other types so code to handle all other types wouldn't get
> in our generated javascript?
>
>   

--

You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.




Limiting serializable types in RPC

2009-12-14 Thread Luis Fernando Planella Gonzalez
Is there a way (it would be nice if there were one) to exclude types
from RPC?
Here's the concrete use case: In our project, the RemoteService
interfaces are defined in a separate project as the web layer. And all
methods / parameters use the Java best practices: always reference
collections by it's interface.
However, having a method to return Collection, for example,
generates code to handle Vector, ArrayList, LinkedList, HashSet,
LinkedHashSet...
As interfaces are in a separated project, and it would be messy and
make maintenance harder to change all interfaces to a given
implementation...
If I know I ALWAYS return ArrayLists or HashSets, is there a way to
blacklist other types so code to handle all other types wouldn't get
in our generated javascript?

--

You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.