Skip to content

Commit

Permalink
改变目录结构,方便阅读
Browse files Browse the repository at this point in the history
  • Loading branch information
linsir6 committed Jul 3, 2017
1 parent 00d6134 commit 734bc42
Show file tree
Hide file tree
Showing 109 changed files with 116 additions and 4,681 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.gradle
.idea
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
*~
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
59 changes: 59 additions & 0 deletions AndroidNote/Android基础/深入了解MVXX模式.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# 深入了解MV**模式


**MVXX模式:**

- MVC
- MVP
- MVVM

这三种架构模式都是现在比较流行的,在不同的项目中,可能采用不同的架构模式,今天我们就围绕着这三种架构模式的试用场景介绍一下他们的概念,以及异同。

## MVC

MVC(Model-View-Controller),Model:逻辑模型,View:视图模型,Controller控制器。



## MVP


Model(Model View Presenter),Model:逻辑模型,View:视图模型,Presenter:不知道。

关于MVP的定义:

- MVC的演化版本,让Model和View完全解耦
- 代码清晰,不过增加了很多类


在Android中,我们的View可能仅仅就是个布局文件,它能做的事情少之又少,真正与布局文件进行数据绑定操作的事Activity,所以这样做就使Activity即像View又像Controller。

应用了MVP之后:

- View:对应Activity,负责View的绘制以及与用户交互
- Model:业务逻辑和实体模型
- Presenter:负责完成View与Model之间的交互



应用两张图来说明上述内容:

![](http://img.blog.csdn.net/20150622212835554)

![](http://img.blog.csdn.net/20150622212856011)



### MVP与MVC区别

如下图所示:

![](http://img.blog.csdn.net/20150622212916054)





## 相关资料

- 浅谈[MVP in Android](http://blog.csdn.net/lmj623565791/article/details/46596109)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
55 changes: 0 additions & 55 deletions GitHub相关/GitHub基础操作.md

This file was deleted.

114 changes: 0 additions & 114 deletions GitHub相关/封装一些GitHub常用命令.md

This file was deleted.

69 changes: 0 additions & 69 deletions Java相关/ArrayList、LinkedList、Vector的异同.md

This file was deleted.

Loading

0 comments on commit 734bc42

Please sign in to comment.