浅谈 MVC、MVP 和 MVVM 架构模式 · /mvx #255
Replies: 32 comments
-
作者你好~: |
Beta Was this translation helpful? Give feedback.
-
MVP 的架构模式是有两种情况的,一种叫做 supervising controller 另一种是 passive view,后者由于 vm 之间没有任何的联系,所以能够与 MVC 之间比较容易的区分,这里可能没有说清楚 |
Beta Was this translation helpful? Give feedback.
-
恩 。: ) |
Beta Was this translation helpful? Give feedback.
-
图非常好看,请问是拿什么工具绘制的? |
Beta Was this translation helpful? Give feedback.
-
好文章。设计模式都在倡导解耦和隔离,但是各种MVC、MVP、MVVM在实际中并没有看到十分明确的标准。 |
Beta Was this translation helpful? Give feedback.
-
既然笔者都把Smalltalk拿出来了,是不是也应该把Java Swing和更早期的AWT也分析一下。 |
Beta Was this translation helpful? Give feedback.
-
对 Java 并不了解,另外我好像没有说过是 M$ 最先有的吧。。 |
Beta Was this translation helpful? Give feedback.
-
你好,想问下你作图的软件是什么,非常漂亮简洁 |
Beta Was this translation helpful? Give feedback.
-
这种抽象的模型还是需要示例代码辅助理解 |
Beta Was this translation helpful? Give feedback.
-
文章内的示意图是用什么工具绘制的? |
Beta Was this translation helpful? Give feedback.
-
同问呢 |
Beta Was this translation helpful? Give feedback.
-
视图层
|
Beta Was this translation helpful? Give feedback.
-
这个用户面向的如果也是V的话,那视图响应用户操作,接下来的指向呢?是交给C处理,还是直接请求Model。
|
Beta Was this translation helpful? Give feedback.
-
防止 -> 放置 |
Beta Was this translation helpful? Give feedback.
-
"当多个视图共享相同的数据时,观察者同步是一个非常关键的模式,它能够在对这些视图不知情的前提下,同时通知多个视图;通过观察者模式,我们可以非常容易地创建一个依赖于同一模型的视图。" 这句话感觉理解起来不太符合上下文。是否是这个意思呢: "...它能够在对 模型 不知情的前提下,同时通知多个视图;通过观察者模式,我们可以非常容易地创建 多 个依赖于同一模型的视图。" |
Beta Was this translation helpful? Give feedback.
-
流程图画的不错,作者的画图工具用的啥呀? |
Beta Was this translation helpful? Give feedback.
-
写的很棒,受益匪浅,不过还有个疑问,现在的web的服务端只有m和c吧,因为现在的web后端基本只负责api接口,不负责渲染视图 |
Beta Was this translation helpful? Give feedback.
-
JSON 也是 View 的一种 |
Beta Was this translation helpful? Give feedback.
-
可以。受教了 |
Beta Was this translation helpful? Give feedback.
-
应该是 keynote, 只是不知水印是怎么打上去的 |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
关于类MVC的架构,我之前也有过一段时间的研究,我感觉,根本性问题是在于对M的理解上,一直以来,我对M的理解为“业务模型”,而不是“数据模型”。如果把M理解为业务模型,视图负责展示,控制器负责调度,基本上不就会需要再衍生出其他类MVC架构了;但是如果把M理解为数据模型,就会像文章中提到的,控制器需要去承载大量的业务逻辑,而控制器与视图在某种程序上的绑定关系,也导致了业务不可迁移。 |
Beta Was this translation helpful? Give feedback.
-
"虽然说整个架构图的逻辑是可以说的通的,不过相比于前面的架构图总是感觉有一些奇怪,而在这幅图片中,视图和控制器之间是毫无关系的,这与前面见到的所有 MVC 架构模式都完全不同,作者也不清楚这幅图来源是什么、为什么这么画,放在这里也仅作参考。" 关于维基百科上的MVC我在仪表开发中应用过这种模式。这种模式一般是实体按键(可看作控制器),没有视图控件的应用实列(控制器和视图物理上分离)。比如掌上游戏机,按下游戏手柄,游戏的内容发生变更,这其中实质是控制器更新了model,视图再从model获得数据,进一步渲染展示出来。 |
Beta Was this translation helpful? Give feedback.
-
耦合确实存在,解耦更具体地理解可以是降低耦合。耦合不能消除,但耦合有强弱好坏之分,数据耦合就优于内容耦合。我们可以通过设计模式降低耦合。 软件工程中的各种耦合类型 |
Beta Was this translation helpful? Give feedback.
-
记得之前阅读分布式文章的时候,有许多“相关文章”,我就总是递归地阅读每一篇。最近想回顾一下,发现这些文章都不见了,变成了标签 |
Beta Was this translation helpful? Give feedback.
-
https://draveness.me/mvx
Beta Was this translation helpful? Give feedback.
All reactions