学习ios客户端架构设计笔记

1、MVC,容易造成Massive View Controller。

2、MVVM,数据绑定使 Debug 变得更难了。数据绑定使程序异常能快速的传递到其他位置,在界面上发现的 Bug 有可能是由 ViewModel 造成的,也有可能是由 Model 层造成的,传递链越长,对 Bug 的定位就越困难


3、APESubject是科目的资源结构,包含了 Subject 的 id 和 name 等资源属性,这部分属性是用户无关的;APEUserSubject是用户的科目信息,包含了用户是否打开某个学科的属性。

@interface APESubject : NSObject

@property (nonatomic, strong, nullable) NSNumber *id;

@property (nonatomic, strong, nullable) NSString *name;

@end

@interface APEUserSubject : NSObject

@property (nonatomic, strong, nullable) NSNumber *id;

@property (nonatomic, strong, nullable) NSNumber *updatedTime;

///  On or Off

@property (nonatomic) APEUserSubjectStatus status;

@end

文/喜欢就可以(作者)

原文链接:http://www.jianshu.com/p/dcbebd09e5da

著作权归作者所有,转载请联系作者获得授权,并标注“作者”。


4、每一个 ViewController 都会有一个对应的 DataController,这一类 DataController 的主要职责是处理这个页面上的所有数据相关的逻辑,我们称其为 View Related Data Controller。

你可能感兴趣的:(学习ios客户端架构设计笔记)