Hi Nathan, On Jul 5, 2:15 am, Nathan Wells <[email protected]> wrote: > I updated my project to only use the two interfaces as suggested by > David. Instead of using actionhandlers and registering them, I created > an annotation for the IRemoteProcedureCall implementations that > contains the canonical class name of the IProcedure that is to be run > on the server.
As you say, one of the downsides of linking the handler to the concrete implementation is that there may be issues with the GWT compiler. That said, in general it seems to mostly ignore attributes, so it may not be an issue. The other downside for me is that it ties the action interface to a specific implementation. This makes it more difficult to write mocks for tests, etc. Having them configured purely on the server-side means you can replace them with whatever you like on in test scenarios. Or, if you want to provide alternate implementations (eg. JDO vs Hibernate), you can have both in your app and just switch between them by changing your DI configuration. The downside of my method is that you may forget to actually implement the handler. Of course, this will generally show up pretty quickly when you try to actually use it. And I guess it's still quite easy to forget to supply the annotation anyway... David --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
