Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

2つの同期 4つの状態 #roppongiswift

397 views

Published on

2018/12/21開催のROPPONGI.swift 第6回の登壇資料です。

Published in: Technology
  • Be the first to comment

2つの同期 4つの状態 #roppongiswift

  1. 1. • / @ktanaka117 • • : • R&D Swift TDD • PEAKS iOS
  2. 2. • GUI • 2 4 • GUI 

  3. 3. • • GUI Architectures
 https://martinfowler.com/eaaDev/uiArchs.html • Flow Synchronization
 https://www.martinfowler.com/eaaDev/FlowSynchronization.html • Observer Synchronization
 https://www.martinfowler.com/eaaDev/MediatedSynchronization.html
  4. 4. 2 • • GUI
  5. 5. • • • • etc…
  6. 6. GUI • MVC • MVP • MVVM • Flux • Redux • etc…
  7. 7. GUI • GUI • View 
 Model • • = Presentation Domain Separation(PDS) • PDS GUI
  8. 8. 2 • (Observer Synchronization) • (Flow Synchronization)
  9. 9. • • • • • ex.) NotificationCenter 
 center.post(name: .someNotification, object: nil)
  10. 10. • • • • • ex.) 
 label.text = “hoge”
 SessionManager.shared.authToken = “1234567890”
  11. 11. 4 • 4 • Screen State • Presentation State • Session State • Record State
  12. 12. Screen State • GUI • ex.) label.text, imageView.image
  13. 13. Presentation State • Screen State 
 Screen State Session State • Screen State Session State • ex.) presenter.labelText, presenter.iconImage, presenter.favState
 
 Twitter 
 on/off (Screen State) 
 (Session/Record State)
  14. 14. Session State • Record State • Record State • ex.) API/DB
  15. 15. Record State • • • ex.) Realm API
  16. 16. GUI • •
  17. 17. Clean Architecture State Presenter ViewModel UseCase Repository APIClient DBClient Presentation Layer Domain Layer Data Layer Clean Architecture GUI 
 Clean Architecture State View ViewController
  18. 18. Presenter ViewModel UseCase Repository APIClient DBClient Presentation Layer Domain Layer Data Layer GUI ViewController View 
 Screen State View ViewController Clean Architecture State
  19. 19. Presenter ViewModel UseCase Repository APIClient DBClient Presentation Layer Domain Layer Data Layer View UseCase Presenter/ViewModel 
 Presentation State View ViewController Clean Architecture State
  20. 20. Presenter ViewModel UseCase Repository APIClient DBClient Presentation Layer Domain Layer Data Layer UseCase Repository Data Layer 
 Data Layer Session State View ViewController Clean Architecture State
  21. 21. Presenter ViewModel UseCase Repository APIClient DBClient Presentation Layer Domain Layer Data Layer DB Record State 
 API DB DB View ViewController Clean Architecture State
  22. 22. Presenter ViewModel 
 UseCase Repository APIClient DBClient MVC, MVP, MVVM GUI 
 Screen State State View ViewController GUI
  23. 23. Screen State 
 GUI Presenter ViewModel UseCase Repository APIClient DBClient Presentation Layer Domain Layer Data Layer View ViewController
  24. 24. 
 Fat GUI APIClient DBClientView ViewController
  25. 25. Screen/Presentation State Session/Record State b ModelView(Controller) (Cocoa) MVC
  26. 26. Twitter 
 Presentation State Screen State MVP(Supervising Controller) View Model Presenter
  27. 27. Session/Record 
 View MVP(Supervising Controller) View Model Presenter
  28. 28. Screen State Presentation State 
 MVP(Passive View) View ModelPresenter
  29. 29. GUI • 
 •
  30. 30. • 2 4 • 
 GUI • 
 • 

  31. 31. 2019/01/10 in FiNC
 App Client Melting Pod #1
  32. 32. 2019/01/15 in pixiv Inc.
 iOS

×