#1. Learn MVC for iPhone OS
Common conventions
Built up from other design patterns
#2. Use MVC to Divide Work
Implement a big idea
Make manageable pieces
#3. Don’t Fight the Framework
Color inside the lines
Make the framework work for you
#4. Don’t Abuse Views
Views don’t own data
Data display and event capture
#5. Plan for iPhone and iPad
Divide code into modules
Higher-level design than MV
#6. Strive for Loose Coupling
Goal is flexibility
Minimizing mutual dependencies
#7. Choose the Right Data Model
iPhone OS gives you many options
Finding the right fit
#8. Decompose Controller Work
The right number of controllers
Special iPhone OS controllers
#9. Take Charge of Your Object Graph
Ownership
Lifecycle
#10. Coordinate State Changes
Updating model after user actions
Updating views after model changes
本文探讨了在iPhone OS上应用MVC设计模式的最佳实践,包括遵循通用约定、合理分配工作、利用框架特性、正确使用视图、适配不同设备、实现松耦合、选择合适的数据模型、分解控制器任务、管理对象图以及协调状态变更等内容。
222

被折叠的 条评论
为什么被折叠?



