GWT 2.2 MVP与GWT 2.1 Activities-Places [英] GWT 2.2 MVP vs. GWT 2.1 Activities-Places
问题描述
我开始开发一个大型的GWT应用程序,在阅读文章和博客帖子后,我试图理解 2.2 Model-View-Presenter 和2.1活动 - 地点设计模式?你推荐哪种模式?为什么?我应该仅仅因为它是更新的而使用MVP?另一方面,Places-Activities似乎更直观......或者我完全错过了这一点,而MVP只是Activities-Places的改进版本?
感谢所有GWT专家:-) 首先,我会建议您阅读以下内容: http://code.google.com/webtoolkit/doc/latest/DevGuideMvpActivitiesAndPlaces.html
MVP - 是一种设计模式,它可以帮助您将逻辑从用户界面分离出来,从而使单元测试更加轻松。它与MVC模式很相似。
活动 - 类似于MVP模式的GWT中的一个概念。
我认为活动比View-Presenters更直观,但没有那么多。你可以看看这个框架来帮助你使用MVP模式(我极力推荐它):
http://code.google.com/p/gwt-platform/
I'm starting to develop a large GWT application, and after reading a lot of articles and blog posts, I'm trying to understand what is the difference between the 2.2 Model-View-Presenter and the 2.1 Activities-Places design patterns? Which pattern do you recommend and why? Should I use MVP simply because it is "newer"? On the other hand Places-Activities seems to be more "intuitive"... Or am i totally missing the point and MVP is just an improved version of Activities-Places?
Thanks to all GWT gurus out there :-)
First I would recommend you reading this: http://code.google.com/webtoolkit/doc/latest/DevGuideMvpActivitiesAndPlaces.html
MVP - is a design pattern which will help you separate logic from your UI to make it easier to Unit test. It's pretty much derived from the MVC pattern.
Activities - a concept in GWT analogous to the MVP pattern.
I think activities are a bit more intuitive than View-Presenters but not that much. You could look at this framework to assist you in using the MVP pattern (I greatly recommend it):
http://code.google.com/p/gwt-platform/
这篇关于GWT 2.2 MVP与GWT 2.1 Activities-Places的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!