Upgrade to Pro — share decks privately, control downloads, hide ads and more …

打造你的 App 架構 iOS 模塊化及路由

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on.
Avatar for Frank Huang Frank Huang
November 08, 2020

打造你的 App 架構 iOS 模塊化及路由

About iOS App modularization architecture and router design, sharing @iPlayground2020 in Taiwan. https://iplayground.io/2020/

Avatar for Frank Huang

Frank Huang

November 08, 2020

More Decks by Frank Huang

Other Decks in Technology

Transcript

  1. About me 黃⾱程 (Frank) • Start iOS journey from 2010

    • Ex-iOS developer 上海 @Farfetch • Ex-iOS developer 北京 @滴滴出⾏ • iOS developer @17LIVE • Twitter: @huang_wc • https://blog.wchuang.cc
  2. 1. 為什麼選這個主題 2. 什麼是模塊化 3. 可以帶來哪些好處 4. 怎麼開始 5. App

    架構分層 6. App 路由 7. 路由設計思路及使⽤範例 8. 總結 Content
  3. FKChatVi ewControlle r FKUserPr ofileViewCo ntroller 1. import header file

    2. Get datasource and push/present the view controller
  4. Checkout Product Login Shopping Bag 分層架構 - UIKit Module ServiceManager

    Model Model Model Model Auth Common Model AppKit Router ImageManager ThemeManger UI Components
  5. Checkout Product Login Shopping Bag 分層架構 - Foundation Module ServiceManager

    Model Model Model Model Auth Common Model AppKit Router ImageManager ThemeManger UI Components Foundation Network DB Utilities Others
  6. 路由設計思路 1. 定義每個⾴⾯ URIs 規則 2. 路由內部維護 mapping table 3.

    註冊每條 URIs 對應的⾴⾯、參數、⾏為 4. 傳入⼀個 URL 5. 路由內部解析 URL,找到對應⾴⾯,執⾏動作
  7. We are Hiring! • (Jr./Sr.) iOS Engineer iOS ⼯程師 •

    Sr. Staff iOS Engineer 資深主任 iOS ⼯程師 • Sr. Staff Android Engineer 資深主任安卓⼯程師 • (Jr/Sr) Android Engineer 安卓⼯程師 (多媒體組)