13

WTM系列视频教程:MVVM

 4 years ago
source link: http://mp.weixin.qq.com/s?__biz=MzAwNTMxMzg1MA%3D%3D&%3Bmid=2654077617&%3Bidx=4&%3Bsn=cbb8c306e86f2128029293d520cc0ed8
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

文字摘要:

要讲MVVM模式,我们先来讲一下传统的MVC模式,要讲MVC模式,我们先来讲一下没有模式。。。

“为了演示没有模式,咱们整个项目就保留一个Program.cs文件,不使用asp.net core的任何其他功能,只用他给我们起一个http的服务,获取用户的访问信息。”

“没有Controller,没有View,没有Model,就一个入口文件,我们要写一个表单的提交,能不能写?当然可以。”

“MVC模式中,Controller是和路由机制配套的, Model是和数据绑定机制配套的。虽然我们只说MVC,但其实没有路由和数据绑定,M和C都是没有意义的。”

“MVVM模式中没有C这个字母,但是WTM使用的MVVM模式还是有Controller的。我们可以把Controller去掉,做一个纯粹的MVVM模式么?技术上肯定是可以实现的。”

“DDD是一种思想,不是一种开发模式,强行把DDD的术语映射到代码中未必是好的。微服务和DDD有点类似,DDD是偏向业务层面将复杂系统分割成若干子系统,而微服务是从技术角度将一个系统拆分。”


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK