GWT 2.2 MVP 与 GWT 2.1 活动场所
我开始开发一个大型 GWT 应用程序,在阅读了大量文章和博客文章后,我试图了解 2.2 模型-视图-Presenter 和 2.1 活动-地点 设计模式?您推荐哪种模式?为什么?我是否应该仅仅因为 MVP“较新”就使用它?另一方面,“地点-活动”似乎更“直观”...或者我完全没有抓住要点,MVP 只是“活动-地点”的改进版本?
感谢所有 GWT 专家:-)
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 :-)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
首先,我建议您阅读以下内容:http://code.google.com/webtoolkit/doc/latest/ DevGuideMvpActivitiesAndPlaces.html
MVP - 是一种设计模式,可帮助您将逻辑与 UI 分离,以便更轻松地进行单元测试。它很大程度上源自 MVC 模式。
活动 - GWT 中的一个概念,类似于 MVP 模式。
我认为活动比 View-Presenters 更直观一些,但也没有那么直观。您可以查看此框架来帮助您使用 MVP 模式(我强烈推荐它):
http://code. google.com/p/gwt-platform/
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/
Places Activity 是 gwt 为 MVP 架构提供的一个框架。 MVP 是一个概念,而实现它的方法之一就是场所活动框架。你绝对应该尝试他们的新地方——活动框架。
在2.1之前(需要确认),gwt只是给出了架构。你必须开发框架。
Places Activities is a framework provided by gwt for the MVP architecture. MVP is the concept, and one of the ways to do it is the places-activities framework. You should definitely try their new places- activities framework.
Before 2.1 (need to confirm), gwt just gave the architecture. you had to develop the framework.