GithubHelp home page GithubHelp logo

shannonchenchn / ios-app-architecture Goto Github PK

View Code? Open in Web Editor NEW
35.0 35.0 9.0 3.29 MB

『iOS 应用架构研究』A journey of diving into iOS app architecture.

Objective-C 86.08% Ruby 0.30% Swift 13.61%
architecture design-pattern ios mvc-mvvm mvvm mvx

ios-app-architecture's People

Contributors

shannonchenchn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ios-app-architecture's Issues

读『杂谈: MVC/MVP/MVVM』

这篇文章按照架构的演进顺序,通过用三种不同的设计模式(MVC、MVP、MVVM)来实现一个示例场景,分别讲解了三种不同的设计模式各自的优缺点。

读 『如何写好一个UITableView』

这篇文章主要讲解了如何写好一个列表这个最熟悉的主题,分别讨论了以下几个问题:

  • 如何优雅地处理 UITableView 的代理方法和数据源方法,以提高代码的复用性和可维护性
  • 网络请求和解析数据的逻辑该怎么处理
  • 下拉刷新和上拉加载更多的逻辑怎么处理

核心问题是如何减轻业务方的负责。

MVVM

  • 什么是 MVVM
  • 为什么要用 MVVM,试图解决什么问题
  • 什么时候用 MVVM
  • MVVM 的特点,优缺点
  • 怎么使用 MVVM 构建 iOS 应用

相关主题:ReactiveCocoa编程范式

浅谈 iOS 应用架构

  • iOS 应用架构到底是什么?
  • 讨论架构要看哪些问题?
    • 解决什么问题
      • 规范
      • 解耦
      • 复用
    • 模块分层
      • View 层
      • 网络层
      • 数据存储层、动态化
      • 工具类、分类
  • 几种架构模式
    • MVC
    • MVCS
    • MVP
    • MVVM
    • VIPER
  • 几个小问题
    • 在 MVC 模式下,ViewController 到底是 View 还是 Controller?
    • 设计架构时的妥协:灵活性(更多的选择) VS. 规范性(更多的约束)
    • View 如何与 Model 解耦?
      • 协议/代理
      • 分类
      • ViewModel/Reformer
    • 是什么导致了Massive View Controller?
    • 如何给 Controller 减负?(核心:拆分 controller)
      • 迁移 UITableView 和 UICollectionView 的代理方法
      • 封装 view
      • 数据加工的逻辑交给 model 层处理
      • 拆分部分任务到 category 中
    • view 层的事件传递的最佳实践?
      • view 层次太多,传到 controller 的话,就会有很多胶水代码(delegate 或者 target-action、block、基于 responder chain 的事件传递等)
      • 如果一个页面中所有的 view 的事件都交给 controller 处理,那么如何保证复用性呢?
  • 结论
    • 没有银弹
    • 只有合适的架构,没有最好的架构

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.