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つの状態 #app_mp

924 views

Published on

2018/01/10開催の「App Client Melting Pot #1」の発表資料です。
https://app-client-mp.connpass.com/event/112973/

Published in: Technology
  • Be the first to comment

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

  1. 1. 2019/01/10 App Client Melting Pot #1 #app_mp
  2. 2. • / @ktanaka117 • • BOOTH iOS • R&D Swift TDD • PEAKS iOS
  3. 3. Voice Transformer VT-4
  4. 4. Voice Transformer VT-4 👧
  5. 5. • GUI 2 4 • 

  6. 6. • • • 2 • 4 • GUI • •
  7. 7. • • 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
  8. 8. 2 • • GUI
  9. 9. • • • • etc…
  10. 10. GUI • MVC • MVP • MVVM • Flux • Redux • etc…
  11. 11. GUI • GUI • View 
 Model • • = Presentation Domain Separation(PDS)
  12. 12. PDS GUI
  13. 13. 2 • (Observer Synchronization) • (Flow Synchronization)
  14. 14. • • • • • ex.) NotificationCenter 
 center.post(name: .someNotification, object: nil)
  15. 15. • • • • • ex.) 
 label.text = “hoge”
 SessionManager.shared.authToken = “1234567890”
  16. 16. 4 • 4 • Screen State • Presentation State • Session State • Record State
  17. 17. Screen State • View • GUI • ex.) label.text, imageView.image
  18. 18. Presentation State • Presenter • Screen State 
 Screen State Session State • ex.) presenter.labelText, presenter.iconImage, presenter.favState
 
 Twitter 
 on/off (Screen State) 
 (Session/Record State)
  19. 19. Session State • Model • Record State • Record State • • ex.) API/DB 
 
 …
  20. 20. Record State • DataStore • • ex.) Realm 
 API
  21. 21. Clean Architecture State Presenter ViewModel UseCase Repository APIClient DBClient Presentation Layer Domain Layer Data Layer Clean Architecture GUI 
 Clean Architecture State View ViewController
  22. 22. Presenter ViewModel UseCase Repository APIClient DBClient Presentation Layer Domain Layer Data Layer GUI ViewController View 
 Screen State View ViewController Clean Architecture State
  23. 23. Presenter ViewModel UseCase Repository APIClient DBClient Presentation Layer Domain Layer Data Layer View UseCase Presenter/ViewModel 
 Presentation State View ViewController Clean Architecture State
  24. 24. 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
  25. 25. Presenter ViewModel UseCase Repository APIClient DBClient Presentation Layer Domain Layer Data Layer DB Record State 
 API DB DB View ViewController Clean Architecture State
  26. 26. State Presenter ViewModel UseCase Repository APIClient DBClient Presentation Layer Domain Layer Data Layer View ViewController
  27. 27. Screen State Record State PDS 
 State Presenter ViewModel UseCase Repository APIClient DBClient Presentation Layer Domain Layer Data Layer View ViewController
  28. 28. 
 Fat State APIClient DBClientView ViewController
  29. 29. Presenter ViewModel UseCase Repository APIClient DBClient MVC, MVP, MVVM GUI 
 Screen State State View ViewController UseCase Repository APIClient DBClient Presenter ViewModel 
 State
  30. 30. Presenter ViewModel UseCase Repository APIClient DBClient View ViewController State UseCase Repository APIClient DBClient Presenter ViewModel 
 etc… 
 💪
  31. 31. Screen/Presentation State Session/Record State ModelView(Controller) (Cocoa) MVC
  32. 32. Twitter 
 Presentation State Screen State MVP(Supervising Controller) View Model Presenter
  33. 33. Session/Record 
 MVP(Supervising Controller) View Model Presenter
  34. 34. 
 MVP(Passive View) View ModelPresenter
  35. 35. GUI • 
 • • 

  36. 36. • • 
 • 
 •
  37. 37. 2019/01/15 in pixiv Inc.
 iOS

×