iOS 开发实用技术导航
NSHipster 中文版
http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
http://www.cocos2d-iphone.org/
CocoaPods
http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
http://code.google.com/mobile/analytics/
WWDC
https://developer.apple.com/wwdc/
Design Guides and Resources
https://developer.apple.com/design/
Transcripts of WWDC sessions
http://asciiwwdc.com
Cocoa with Love
http://cocoawithlove.com/
Cocoa Dev Central
http://cocoadevcentral.com/
NSHipster
http://nshipster.com/
Style Guides
Google Objective-C Style Guide
NYTimes Objective-C Style Guide
Useful Tools and Services
Charles Web Debugging Proxy
Smore
rrubick
V2EX  ›  iDev

有用 VIPER 的吗?想请教下后续的逻辑代码应该怎么写?写在哪?

  •  
  •   rrubick · Aug 11, 2021 · 5054 views
    This topic created in 1741 days ago, the information mentioned may be changed or developed.

    最近在看架构方面,网上的 VIPER demo 一般都止步于初步的展示,比如:

    从网络里拿数据然后展示在 UITableView 里。

    但是后续的都没写,想请教下后续的一些逻辑应该写在哪里?怎么写?

    1. 点击 cell 要根据 viewModel 去网络上获取数据 (要写在 Interactor 里吗)
    2. 跳转到其它 controller ( Router 里吗)
    3. 给要跳转的 controller 传递数据(新 controller 的 router 里吗)
    10 replies    2022-03-25 15:45:09 +08:00
    rrubick
        1
    rrubick  
    OP
       Aug 11, 2021
    @onevcat
    不知道能否把大佬邀请过来作答一下
    rrubick
        3
    rrubick  
    OP
       Aug 11, 2021
    @waltcow #2
    感谢大佬,我看看去
    onevcat
        4
    onevcat  
       Aug 11, 2021   ❤️ 1
    装死...我也不会用这个..
    sikong31
        5
    sikong31  
       Aug 11, 2021   ❤️ 1
    架构这方面自己用起来会有很多难以适应的地方,你就算找到个大佬,也难说清楚,实际应用没有个定论。

    架构是个巨坑,不建议一个人开始太深入
    rrubick
        6
    rrubick  
    OP
       Aug 11, 2021
    @onevcat #4
    [允悲]没能得到大佬指点
    rrubick
        7
    rrubick  
    OP
       Aug 11, 2021
    @sikong31 #5
    这不想看看实际是咋写的,别自己瞎写的四不象。
    学架构也是想给自己加点硬实力吧,毕竟都快找不到工作了,,,
    sikong31
        8
    sikong31  
       Aug 11, 2021
    @magic3584 可以看看 clean architecture,资料多一些
    rrubick
        9
    rrubick  
    OP
       Aug 11, 2021
    @sikong31 #8
    大佬说的是网址还是书?
    iOS 现在能叫出来的架构就这几种。。。
    flyff1991
        10
    flyff1991  
       Mar 25, 2022
    @onevcat VIPER 现在有用到吗
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1418 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 17:06 · PVG 01:06 · LAX 10:06 · JFK 13:06
    ♥ Do have faith in what you're doing.