Hi Charles, > - do I have to duplicate datas in my Model (MVC) ? > - what about asyncCallback when calling a service: whe doing that part > in a widget (view side), I was able to display a window (Window.alert) > when the RPC failed. Now, this code is done in the Model (MVC) so it > doesn't make sense to add this kind of code there... > - how can I handle exceptions? For example, as I can't display a > window in the Model part, I would like throw an exception which will > be thrown from the Model to the View through the controller.. How can > I do that? I can see that onFailure method from AsyncCallback doesn't > throw any controlled exception. In addition, it is an asynchronous > call... >
You observations illustrate some reasons why when Swing and SWT where designed they did not follow classic MVC, but implemented a variant of it sometimes called Model Delegate. It's more convenient and concise. There are no downsides because there is nothing to stop you implementing full blown MVC (by which I mean rigorous separation of view and controller in the UI) if you need to. See: http://c2.com/cgi/wiki?ModelDelegate GWT is loosely based on Swing/SWT programming model (as far as it can given it runs as javascript). It makes sense to follow the programming model of your tool kit, or at least to investigate why it follows the pattern it does, rather than blindly follow traditional MVC dogma. regards gregor --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
