Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Clean Architecture Outline
Search
USAMI Kosuke
August 29, 2017
Programming
3
480
Clean Architecture Outline
https://kanmoba.connpass.com/event/64315/
USAMI Kosuke
August 29, 2017
Tweet
Share
More Decks by USAMI Kosuke
See All by USAMI Kosuke
Onsager代数とその周辺 / Onsager algebra tsudoi
usamik26
0
580
Apple HIG 正式名称クイズ結果発表 / HIG Quiz Result
usamik26
0
140
ゆめみ大技林製作委員会の立ち上げの話 / daigirin project
usamik26
0
300
@ViewLoadingプロパティラッパの紹介と自前で実装する方法 / @ViewLoading property wrapper implementation
usamik26
0
450
これからUICollectionViewを実践活用する人のためのガイド / Guide to UICollectionView
usamik26
1
710
Xcodeとの最近の付き合い方のはなし / Approach To Xcode
usamik26
2
640
UICollectionView Compositional Layout
usamik26
0
720
Coding Swift with Visual Studio Code and Docker
usamik26
0
480
Swift Extension for Visual Studio Code
usamik26
2
970
Other Decks in Programming
See All in Programming
お前もAI鬼にならないか?👹Bolt & Cursor & Supabase & Vercelで人間をやめるぞ、ジョジョー!👺
taishiyade
5
3.8k
CloudNativePGがCNCF Sandboxプロジェクトになったぞ! 〜CloudNativePGの仕組みの紹介〜
nnaka2992
0
220
2024年のkintone API振り返りと2025年 / kintone API look back in 2024
tasshi
0
210
Amazon S3 TablesとAmazon S3 Metadataを触ってみた / 20250201-jawsug-tochigi-s3tables-s3metadata
kasacchiful
0
100
XStateを用いた堅牢なReact Components設計~複雑なClient Stateをシンプルに~ @React Tokyo ミートアップ #2
kfurusho
1
770
[JAWS-UG横浜 #79] re:Invent 2024 の DB アップデートは Multi-Region!
maroon1st
1
140
AWS Organizations で実現する、 マルチ AWS アカウントのルートユーザー管理からの脱却
atpons
0
130
Domain-Driven Transformation
hschwentner
2
1.9k
法律の脱レガシーに学ぶフロントエンド刷新
oguemon
5
730
昭和の職場からアジャイルの世界へ
kumagoro95
1
350
『GO』アプリ バックエンドサーバのコスト削減
mot_techtalk
0
130
[JAWS-UG横浜 #80] うわっ…今年のServerless アップデート、少なすぎ…?
maroon1st
1
170
Featured
See All Featured
Designing Experiences People Love
moore
139
23k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
10
1.3k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Fireside Chat
paigeccino
34
3.2k
Statistics for Hackers
jakevdp
797
220k
Typedesign – Prime Four
hannesfritz
40
2.5k
The Pragmatic Product Professional
lauravandoore
32
6.4k
For a Future-Friendly Web
brad_frost
176
9.5k
Thoughts on Productivity
jonyablonski
69
4.5k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
49
2.3k
The Language of Interfaces
destraynor
156
24k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Transcript
Clean Architecture ͷ େΛͬ͘͟Γཧղ͢Δ USAMI Kosuke Fenrir Inc.
ࣗݾհ • Ӊࠤݟެี (@usamik26) • ϑΣϯϦϧגࣜձࣾ • iOS ΞϓϦ։ൃ :
Swift / Xamarin (C#)
Clean Architecture • ݩهࣄ : The Clean Architecture | 8th
Light • ΞϓϦέʔγϣϯͷઃܭύλʔϯͷͻͱͭ • ϞόΠϧΞϓϦ։ൃք۾Ͱ࠷ۙԿ͔͕ڍ͕ͬͨ
ݩهࣄ
ղઆهࣄ͍͔ͭ͋͘Δ͚Ͳɾɾɾ • ݩهࣄղઆهࣄɺղઆ͕ࡉ͔͗͢ΔͷͰͳ͍͔ʁ • ૈཻ͍ͷͱࡉཻ͔͍ͷ͕͍ࠞͬͯ͟ΔͷͰ • ·ͣɺͬ͘͟Γେ͖ͳΈΛѲΛͨ͠ํ͕ྑ͍
େ͖ͳΈΛѲ͢Δ • ·ͣશମਤΛ͏ҰݟͯΈΔ
None
ਤΛॻ͖ͯ͠ΈΔ • Onion ਤॳݟͰϐϯͱ͜ͳ͍ʢݸਓͷײͰ͢ʣ • ͋͑ͯੲͳ͕Βͷ Layer ਤͰॻ͖ͯ͠ΈΔ
None
MV◦ ύλʔϯͱൺͯΈΔ
ൺͨ݁Ռ • MV◦ ύλʔϯͰ Model ਂ۷Γ͞Ε͍ͯͳ͔ͬͨ • View ͱ Model
ͱͷʹॏ͕͋ͬͨ • M ͱ V ͷͭͳ͗ํʹ͍ͯͨ͠ʢMVC / MVP / MVVMʣ • Model ͷதͰɺಉ༷ͷ͕Ͱ͖Δ • ϏδωεϩδοΫͱ DB ͱͷ
ґଘؔΛݟͯ͠ΈΔ
ґଘ͕ؔٯస͍ͯ͠Δ • ैདྷͷ Layer ߏͰ্͔ΒԼґଘ͍ͯͨ͠ • Clean Architecture ֎͔Βґଘ͍ͯ͠Δ •
Onion ਤ͜ΕΛදݱ͍ͯͨ͠
ิ : ґଘؔΛٯసͤ͞Δख๏ • Լͷͷ Interface Λ্ͷ͕ఆٛɺґଘੑͷೖʢDIʣΛ͏ • ͦͦґଘؔͱ͍͏ͷ Interface
ʹର͢Δґଘ • ͦͷͨΊɺInterface ͷఆٛΛ୭͕͔࣋ͭͰґଘ͕ؔมΘΔ
ґଘؔͷมԽʹΑͬͯԿ͕ى͜Δ͔ • Business Rules ͕த৺ͱͳΔ • ֎քʢUI DB ͳͲʣʹࠨӈ͞Εͳ͍ੈք͕Ͱ͖Δ
֎քʹӨڹ͞Εͳ͍ੈք • ७ਮͳϞσϦϯάͷੈք • Domain Driven Design ͷύλʔϯ͕༗ӹ • ͞Βʹಥ͖٧ΊΔͱ෭࡞༻ʢSide
Effectʣͷͳ͍ੈք
Clean Architecture ࠾༻࣌ͷཹҙࣄ߲ • Business Rules ʹϩδοΫΛूத͢Δ • Controllers /
Presenters / Gateways ബ͘͢Δ • UI / DB / ... ݸʑͷׂʹಛԽ͢Δ
࠾༻ྫ : ΞϨϯδ͋Γ
ิ : Controllers / Presenters • Clean Architecture ͷͱҰॹʹޠΒΕΔ͜ͱ͕ଟ͍ •
͔͠͠ɺΞʔΩςΫνϟઃܭͷͱ͚ͯཧղͨ͠ํ͕ྑ͍ • ͪΖΜɺ༗ӹͳઃܭύλʔϯͰ͋Δ • MVC / MVP / MVVM ͷΑ͏ʹ M ͱ V ΛͲ͏ͭͳ͙͔ͷ
͓ΘΓʹ • େΛѲ͢Δखॿ͚ʹͳͬͨͳΒ͍Ͱ͢ • ͦͷ͏͑ͰݩهࣄղઆهࣄΛಡΈ͢ • ͢Δͱɺ৽ͨͳؾ͖͕ͮ͋Δ͔