问题
Could any of you guys give a good explanation of the MVP pattern with regards to use in a GWT application. any example i have viewed, i found it hard to understand the concept of implementing the pattern.
Questions such as what is it? what does it achieve, how is it implemented and how can it be extended for future modifications?
回答1:
http://code.google.com/webtoolkit/articles/mvp-architecture.html and http://code.google.com/webtoolkit/articles/mvp-architecture-2.html
回答2:
The primary goal of the MVP pattern is to separate the controlling of your UI from the implementation of your UI. You can think of these two concerns as a splitting of the traditional "view" in MVC.
One of the key benefits is that your presenters should be completely testable without any reference to UI widgets, etc. For GWT, this is particularly valuable since tests that use GWTTestCase can be particularly slow.
来源:https://stackoverflow.com/questions/3000542/question-on-the-mvp-within-gwt-general-overview