On Saturday, August 3, 2013 12:42:54 AM UTC+2, Michael Prentice wrote: > > Currently, I am looking at creating 2 interfaces and 3 classes for every > RpcService. I'm wondering if I can do better before I start implementing a > ton of services. > > > - Interface to extend RemoteService > - Interface for AsyncCallback > - Class to represent the request and hold its DTO > - Class to represent the response and hold its DTO > - Class to implement my Interface above that extends RemoteService. > > I've been looking at trying to do better here wvia DI. But so far I > haven't really hit on the right solution. I did get Guice to manage my > servlets via ServletModule and GuiceServletContextListener though. > > I need to implement about 40 services in the shortest time possible and I > don't want to create more boilerplate than I need. I already have all of > the DTOs (auto generated) and I just need to hook them up to new services. > > If anyone can identify the part of this that can be improved, I can > provide some sample code to help identify the solution easier. >
How about using a single service/serviceAsync/serviceImpl for more than one request/response/DTOs? Instead of "40 services" with all that boilerplate, you'd *only* need 40 methods on a single *service*. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.