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
470
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
360
Apple HIG 正式名称クイズ結果発表 / HIG Quiz Result
usamik26
0
62
ゆめみ大技林製作委員会の立ち上げの話 / daigirin project
usamik26
0
250
@ViewLoadingプロパティラッパの紹介と自前で実装する方法 / @ViewLoading property wrapper implementation
usamik26
0
350
これからUICollectionViewを実践活用する人のためのガイド / Guide to UICollectionView
usamik26
1
600
Xcodeとの最近の付き合い方のはなし / Approach To Xcode
usamik26
2
520
UICollectionView Compositional Layout
usamik26
0
530
Coding Swift with Visual Studio Code and Docker
usamik26
0
330
Swift Extension for Visual Studio Code
usamik26
2
740
Other Decks in Programming
See All in Programming
Crafting a Own PHP - ウキウキ手作りミニマリストPHP
uzulla
4
1.1k
設計の知識と技能で駆動するソフトウェア開発
masuda220
PRO
18
11k
生成 AI の中身を覗いてみよう〜基礎から医療現場での応用まで〜
soh9834
2
770
脱・初心者!脱・マネコン!AWS CDKを使ってみませんか!?
har1101
0
180
WebComponentsで フレームワークを1ページに共存させる
webuilder240
0
150
Compiling Python to WebAssembly with py2wasm
syrusakbary
0
140
Learning PHP and Static Analysis with PHP Parser
inouehi
1
250
RubyVM を PHP で実装する 〜Hello World を出力するまで〜
memory1994
PRO
1
490
Kotlinを用いたDSL的な設計手法と使用上の注意
kohii00
3
530
Laravel標準バリデーションでできること
hmb_ok
2
360
LPIXEL×CADDi_kaerururu
kaerururu
3
300
とにかくHTTP3をライトニングに話す / Anyway, I'll talk to Lightning about HTTP3.
seike460
PRO
0
120
Featured
See All Featured
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
153
14k
The World Runs on Bad Software
bkeepers
PRO
60
6.6k
Build The Right Thing And Hit Your Dates
maggiecrowley
23
1.9k
Faster Mobile Websites
deanohume
296
30k
Practical Orchestrator
shlominoach
180
9.7k
Imperfection Machines: The Place of Print at Facebook
scottboms
257
12k
Unsuck your backbone
ammeep
661
56k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
5
1.4k
Fashionably flexible responsive web design (full day workshop)
malarkey
397
65k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
657
120k
[RailsConf 2023] Rails as a piece of cake
palkan
21
3.8k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
6
950
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 ΛͲ͏ͭͳ͙͔ͷ
͓ΘΓʹ • େΛѲ͢Δखॿ͚ʹͳͬͨͳΒ͍Ͱ͢ • ͦͷ͏͑ͰݩهࣄղઆهࣄΛಡΈ͢ • ͢Δͱɺ৽ͨͳؾ͖͕ͮ͋Δ͔