SlideShare a Scribd company logo
Submit Search
Upload
2つの同期 4つの状態 #pixiv_ios_arch
Report
Share
Kenji Tanaka
iOSエンジニア,サーバーサイドエンジニア at ピクシブ株式会社
Follow
•
4 likes
•
3,089 views
1
of
48
2つの同期 4つの状態 #pixiv_ios_arch
•
4 likes
•
3,089 views
Report
Share
Download Now
Download to read offline
Technology
2019/01/15開催の「iOSアプリ設計ナイト」の登壇資料です。 https://pixiv.connpass.com/event/112561/
Read more
Kenji Tanaka
iOSエンジニア,サーバーサイドエンジニア at ピクシブ株式会社
Follow
Recommended
2つの同期 4つの状態 #app_mp by
2つの同期 4つの状態 #app_mp
Kenji Tanaka
1.7K views
•
47 slides
Bitrise & OpenSTF by
Bitrise & OpenSTF
Karol Wrótniak
390 views
•
14 slides
Microservices from operations aspect by
Microservices from operations aspect
David Papp
7.5K views
•
26 slides
Microservices environment in production by
Microservices environment in production
David Papp
7.6K views
•
44 slides
Continuous Deployment with Containers by
Continuous Deployment with Containers
David Papp
7.8K views
•
38 slides
Putting The 'M' In MBaaS—Red Hat Mobile Client Development Platform (Jay Balu... by
Putting The 'M' In MBaaS—Red Hat Mobile Client Development Platform (Jay Balu...
Red Hat Developers
173 views
•
45 slides
More Related Content
What's hot
APIs for API Management: Consume and Develop Apps by
APIs for API Management: Consume and Develop Apps
WSO2
914 views
•
17 slides
Indore mule soft meetup 3 by
Indore mule soft meetup 3
Kirti Gurjar
316 views
•
26 slides
Lightweight ESB Alternatives by
Lightweight ESB Alternatives
Chris Haddad
5.8K views
•
28 slides
Kubernetes - training micro-dragons without getting burnt by
Kubernetes - training micro-dragons without getting burnt
Amir Moghimi
952 views
•
22 slides
Glpi 9.2-presentation by
Glpi 9.2-presentation
alexandre delaunay
3.8K views
•
36 slides
SDLC, Agile methodologies and Career in Product management by
SDLC, Agile methodologies and Career in Product management
Foyzul Karim
254 views
•
12 slides
What's hot
(11)
APIs for API Management: Consume and Develop Apps by WSO2
APIs for API Management: Consume and Develop Apps
WSO2
•
914 views
Indore mule soft meetup 3 by Kirti Gurjar
Indore mule soft meetup 3
Kirti Gurjar
•
316 views
Lightweight ESB Alternatives by Chris Haddad
Lightweight ESB Alternatives
Chris Haddad
•
5.8K views
Kubernetes - training micro-dragons without getting burnt by Amir Moghimi
Kubernetes - training micro-dragons without getting burnt
Amir Moghimi
•
952 views
Glpi 9.2-presentation by alexandre delaunay
Glpi 9.2-presentation
alexandre delaunay
•
3.8K views
SDLC, Agile methodologies and Career in Product management by Foyzul Karim
SDLC, Agile methodologies and Career in Product management
Foyzul Karim
•
254 views
DevOps Moves To Production (Lori MacVittie) by Red Hat Developers
DevOps Moves To Production (Lori MacVittie)
Red Hat Developers
•
1.5K views
Introduction to WSO2 Developer Studio by WSO2
Introduction to WSO2 Developer Studio
WSO2
•
5.4K views
Web application I have always dreamt of by Victor_Cr
Web application I have always dreamt of
Victor_Cr
•
2K views
Microservices: A developer's approach by Foyzul Karim
Microservices: A developer's approach
Foyzul Karim
•
401 views
A practical approach on - How to design offline-online synchronization system by Foyzul Karim
A practical approach on - How to design offline-online synchronization system
Foyzul Karim
•
354 views
Similar to 2つの同期 4つの状態 #pixiv_ios_arch
2つの同期 4つの状態 #roppongiswift by
2つの同期 4つの状態 #roppongiswift
Kenji Tanaka
541 views
•
41 slides
Why and How SmartNews uses SaaS? by
Why and How SmartNews uses SaaS?
Takumi Sakamoto
501 views
•
76 slides
淺談 Startup 公司的軟體開發流程 v2 by
淺談 Startup 公司的軟體開發流程 v2
Wen-Tien Chang
38.8K views
•
160 slides
Agile startup company management and operation by
Agile startup company management and operation
Jiang Zhu
872 views
•
160 slides
First Look at Azure Logic Apps (BAUG) by
First Look at Azure Logic Apps (BAUG)
Daniel Toomey
738 views
•
41 slides
20140211 BTUG.be - Workflow Manager by
20140211 BTUG.be - Workflow Manager
BTUGbe
599 views
•
28 slides
Similar to 2つの同期 4つの状態 #pixiv_ios_arch
(20)
2つの同期 4つの状態 #roppongiswift by Kenji Tanaka
2つの同期 4つの状態 #roppongiswift
Kenji Tanaka
•
541 views
Why and How SmartNews uses SaaS? by Takumi Sakamoto
Why and How SmartNews uses SaaS?
Takumi Sakamoto
•
501 views
淺談 Startup 公司的軟體開發流程 v2 by Wen-Tien Chang
淺談 Startup 公司的軟體開發流程 v2
Wen-Tien Chang
•
38.8K views
Agile startup company management and operation by Jiang Zhu
Agile startup company management and operation
Jiang Zhu
•
872 views
First Look at Azure Logic Apps (BAUG) by Daniel Toomey
First Look at Azure Logic Apps (BAUG)
Daniel Toomey
•
738 views
20140211 BTUG.be - Workflow Manager by BTUGbe
20140211 BTUG.be - Workflow Manager
BTUGbe
•
599 views
Workflow Manager - a technical overview (Sam Vanhoutte) by Sam Vanhoutte
Workflow Manager - a technical overview (Sam Vanhoutte)
Sam Vanhoutte
•
10.8K views
Vincent biret azure functions and flow (ottawa) by Vincent Biret
Vincent biret azure functions and flow (ottawa)
Vincent Biret
•
176 views
Vincent biret azure functions and flow (toronto) by Vincent Biret
Vincent biret azure functions and flow (toronto)
Vincent Biret
•
479 views
從 Ops 觀點看 DevOps, DevOps from Ops Perspective by Robert Hu
從 Ops 觀點看 DevOps, DevOps from Ops Perspective
Robert Hu
•
2.2K views
Building your bi system-HadoopCon Taiwan 2015 by Bryan Yang
Building your bi system-HadoopCon Taiwan 2015
Bryan Yang
•
799 views
Xtending nintex workflow cloud w azure functions - xchange conference by Michael Oryszak
Xtending nintex workflow cloud w azure functions - xchange conference
Michael Oryszak
•
257 views
Red Hat JBoss BRMS and BPMS Workbench and Rich Client Technology by Mark Proctor
Red Hat JBoss BRMS and BPMS Workbench and Rich Client Technology
Mark Proctor
•
3.8K views
#Techorama belgium 2018 vincent biret what's new with the #MicrosoftGraph by Vincent Biret
#Techorama belgium 2018 vincent biret what's new with the #MicrosoftGraph
Vincent Biret
•
250 views
Microsoft BI Cool Data Visualizations by Mark Kromer
Microsoft BI Cool Data Visualizations
Mark Kromer
•
766 views
An insight to microsoft platform by Confiz
An insight to microsoft platform
Confiz
•
582 views
SPS calgary 2017 introduction to azure functions microsoft flow by Vincent Biret
SPS calgary 2017 introduction to azure functions microsoft flow
Vincent Biret
•
538 views
DevOps by examples @ devopsheroes 2016 by Giulio Vian
DevOps by examples @ devopsheroes 2016
Giulio Vian
•
214 views
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile by Amazon Web Services Japan
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
Amazon Web Services Japan
•
467 views
Sps toronto introduction to azure functions microsoft flow by Vincent Biret
Sps toronto introduction to azure functions microsoft flow
Vincent Biret
•
326 views
More from Kenji Tanaka
FatViewControllerを安全に書き換える方法が見つからなかったので、どういう痛みを許容するか考えた #iosdc by
FatViewControllerを安全に書き換える方法が見つからなかったので、どういう痛みを許容するか考えた #iosdc
Kenji Tanaka
13K views
•
39 slides
リリース前のリグレッションテストがめんどい!のでMagic PodでUIテストを試してみる #pixiv_app_night by
リリース前のリグレッションテストがめんどい!のでMagic PodでUIテストを試してみる #pixiv_app_night
Kenji Tanaka
1.2K views
•
16 slides
ポストモーテムやってみた #yjbonfire by
ポストモーテムやってみた #yjbonfire
Kenji Tanaka
1.7K views
•
17 slides
トークンリフレッシュ処理を含むAPIClientのテスト #hakata_test_night by
トークンリフレッシュ処理を含むAPIClientのテスト #hakata_test_night
Kenji Tanaka
2K views
•
47 slides
よく使うテストヘルパーの紹介 #ios_test_night by
よく使うテストヘルパーの紹介 #ios_test_night
Kenji Tanaka
804 views
•
12 slides
Swiftで聞いておぼえるテスト書き by
Swiftで聞いておぼえるテスト書き
Kenji Tanaka
494 views
•
33 slides
More from Kenji Tanaka
(20)
FatViewControllerを安全に書き換える方法が見つからなかったので、どういう痛みを許容するか考えた #iosdc by Kenji Tanaka
FatViewControllerを安全に書き換える方法が見つからなかったので、どういう痛みを許容するか考えた #iosdc
Kenji Tanaka
•
13K views
リリース前のリグレッションテストがめんどい!のでMagic PodでUIテストを試してみる #pixiv_app_night by Kenji Tanaka
リリース前のリグレッションテストがめんどい!のでMagic PodでUIテストを試してみる #pixiv_app_night
Kenji Tanaka
•
1.2K views
ポストモーテムやってみた #yjbonfire by Kenji Tanaka
ポストモーテムやってみた #yjbonfire
Kenji Tanaka
•
1.7K views
トークンリフレッシュ処理を含むAPIClientのテスト #hakata_test_night by Kenji Tanaka
トークンリフレッシュ処理を含むAPIClientのテスト #hakata_test_night
Kenji Tanaka
•
2K views
よく使うテストヘルパーの紹介 #ios_test_night by Kenji Tanaka
よく使うテストヘルパーの紹介 #ios_test_night
Kenji Tanaka
•
804 views
Swiftで聞いておぼえるテスト書き by Kenji Tanaka
Swiftで聞いておぼえるテスト書き
Kenji Tanaka
•
494 views
設計時空のリファクタリング by Kenji Tanaka
設計時空のリファクタリング
Kenji Tanaka
•
4.4K views
WACATE 2018 Summer by Kenji Tanaka
WACATE 2018 Summer
Kenji Tanaka
•
1.4K views
テスト駆動開発入門 by Swift by Kenji Tanaka
テスト駆動開発入門 by Swift
Kenji Tanaka
•
518 views
An iOS Engineer challenges Web. by Kenji Tanaka
An iOS Engineer challenges Web.
Kenji Tanaka
•
877 views
エンジニアのためのブログ講座Ver4 by Kenji Tanaka
エンジニアのためのブログ講座Ver4
Kenji Tanaka
•
1.3K views
TDDやってみよ by Kenji Tanaka
TDDやってみよ
Kenji Tanaka
•
482 views
ストレス社会に生きる、iOSエンジニアにオススメする百合の世界と作品 by Kenji Tanaka
ストレス社会に生きる、iOSエンジニアにオススメする百合の世界と作品
Kenji Tanaka
•
927 views
節子、それViewControllerやない...、FatViewControllerや...。 by Kenji Tanaka
節子、それViewControllerやない...、FatViewControllerや...。
Kenji Tanaka
•
30.4K views
iOS 11からのDeviceCheck #とは by Kenji Tanaka
iOS 11からのDeviceCheck #とは
Kenji Tanaka
•
1.4K views
設計に答えはないから探してみよう by Kenji Tanaka
設計に答えはないから探してみよう
Kenji Tanaka
•
1.3K views
iOS 11からのアプリ間ファイル共有 by Kenji Tanaka
iOS 11からのアプリ間ファイル共有
Kenji Tanaka
•
5.2K views
iOS 11からのアプリ間ファイル共有_公開用 by Kenji Tanaka
iOS 11からのアプリ間ファイル共有_公開用
Kenji Tanaka
•
4.7K views
参加者と振り返るWWDC17 公開用 by Kenji Tanaka
参加者と振り返るWWDC17 公開用
Kenji Tanaka
•
990 views
WWWDCの振り返りを始めるために by Kenji Tanaka
WWWDCの振り返りを始めるために
Kenji Tanaka
•
1K views
Recently uploaded
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas... by
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
Bernd Ruecker
50 views
•
69 slides
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P... by
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...
ShapeBlue
154 views
•
62 slides
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ... by
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
ShapeBlue
123 views
•
28 slides
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T by
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T
ShapeBlue
112 views
•
34 slides
Uni Systems for Power Platform.pptx by
Uni Systems for Power Platform.pptx
Uni Systems S.M.S.A.
61 views
•
21 slides
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPool by
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPool
ShapeBlue
84 views
•
10 slides
Recently uploaded
(20)
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas... by Bernd Ruecker
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
Bernd Ruecker
•
50 views
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P... by ShapeBlue
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...
ShapeBlue
•
154 views
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ... by ShapeBlue
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
ShapeBlue
•
123 views
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T by ShapeBlue
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T
ShapeBlue
•
112 views
Uni Systems for Power Platform.pptx by Uni Systems S.M.S.A.
Uni Systems for Power Platform.pptx
Uni Systems S.M.S.A.
•
61 views
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPool by ShapeBlue
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPool
ShapeBlue
•
84 views
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f... by TrustArc
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc
•
160 views
Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O... by ShapeBlue
Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O...
ShapeBlue
•
88 views
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue by ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
ShapeBlue
•
94 views
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava... by ShapeBlue
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...
ShapeBlue
•
101 views
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R... by ShapeBlue
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...
ShapeBlue
•
132 views
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue by ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
ShapeBlue
•
93 views
Data Integrity for Banking and Financial Services by Precisely
Data Integrity for Banking and Financial Services
Precisely
•
78 views
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue by ShapeBlue
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
ShapeBlue
•
176 views
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ... by ShapeBlue
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
ShapeBlue
•
85 views
Ransomware is Knocking your Door_Final.pdf by Security Bootcamp
Ransomware is Knocking your Door_Final.pdf
Security Bootcamp
•
90 views
Confidence in CloudStack - Aron Wagner, Nathan Gleason - Americ by ShapeBlue
Confidence in CloudStack - Aron Wagner, Nathan Gleason - Americ
ShapeBlue
•
88 views
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue by ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
ShapeBlue
•
222 views
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti... by ShapeBlue
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
ShapeBlue
•
98 views
Microsoft Power Platform.pptx by Uni Systems S.M.S.A.
Microsoft Power Platform.pptx
Uni Systems S.M.S.A.
•
80 views
2つの同期 4つの状態 #pixiv_ios_arch
1.
2019/01/15 iOS #pixiv_ios_arch
2.
• / @ktanaka117 • •
BOOTH iOS • R&D Swift TDD • PEAKS iOS
3.
Voice Transformer VT-4
4.
Voice Transformer VT-4 👧
5.
• GUI 2
4 •
6.
• • • 2 • 4 •
GUI • •
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
9.
2 • • GUI
10.
• • • • etc…
11.
GUI • MVC • MVP •
MVVM • Flux • Redux • etc…
12.
GUI • GUI • View
Model • • = Presentation Domain Separation(PDS)
13.
PDS GUI
15.
2 • (Observer Synchronization) •
(Flow Synchronization)
16.
• • • • • ex.) NotificationCenter
center.post(name: .someNotification, object: nil)
17.
• • • • • ex.) label.text
= “hoge” SessionManager.shared.authToken = “1234567890”
19.
4 • 4 • Screen
State • Presentation State • Session State • Record State
20.
Screen State • View •
GUI • ex.) label.text, imageView.image
21.
Presentation State • Presenter •
Screen State Screen State Session State • ex.) presenter.labelText, presenter.iconImage, presenter.favState Twitter on/off (Screen State) (Session/Record State)
22.
Session State • Model •
Record State • Record State • • ex.) API/DB …
23.
Record State • DataStore • •
ex.) Realm API
26.
Clean Architecture State Presenter ViewModel UseCase Interactor APIClient DBClient Presentation
Layer Domain Layer Data Layer Clean Architecture GUI Clean Architecture State View ViewController
27.
Presenter ViewModel APIClient DBClient Presentation Layer Domain
Layer Data Layer GUI ViewController View Screen State View ViewController Clean Architecture State UseCase Interactor
28.
Presenter ViewModel APIClient DBClient Presentation Layer Domain
Layer Data Layer View UseCase Presenter/ViewModel Presentation State View ViewController Clean Architecture State UseCase Interactor
29.
Presenter ViewModel APIClient DBClient Presentation Layer Domain
Layer Data Layer UseCase Interactor Data Layer Data Layer Session State View ViewController Clean Architecture State UseCase Interactor
30.
Presenter ViewModel APIClient DBClient Presentation Layer Domain
Layer Data Layer DB Record State API DB DB View ViewController Clean Architecture State UseCase Interactor
31.
PDS GUI
32.
PDS Screen State
Record State
33.
State = Presenter ViewModel APIClient DBClientView ViewController UseCase Interactor Screen
State Record State PDS
34.
Fat APIClient DBClientView ViewController State =
35.
Presenter ViewModel UseCase Interactor APIClient
DBClient MVC, MVP, MVVM GUI Screen State State View ViewController UseCase Interactor APIClient DBClient Presenter ViewModel State
36.
Presenter ViewModel UseCase Interactor APIClient
DBClient View ViewController UseCase Interactor APIClient DBClient Presenter ViewModel State etc… 💪
39.
Screen/Presentation State Session/Record
State ModelView(Controller) (Cocoa) MVC
41.
Twitter Presentation State
Screen State MVP(Supervising Controller) View Model Presenter
42.
Session/Record MVP(Supervising Controller) View
Model Presenter
44.
MVP(Passive View) View ModelPresenter
46.
GUI • • •
47.
• • • •