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
570
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
470
Swift Extension for Visual Studio Code
usamik26
2
960
Other Decks in Programming
See All in Programming
DMMオンラインサロンアプリのSwift化
hayatan
0
230
ペアーズでの、Langfuseを中心とした評価ドリブンなリリースサイクルのご紹介
fukubaka0825
1
170
ErdMap: Thinking about a map for Rails applications
makicamel
1
1k
サーバーゆる勉強会 DBMS の仕組み編
kj455
1
350
DevFest - Serverless 101 with Google Cloud Functions
tunmise
0
140
為你自己學 Python
eddie
0
540
BEエンジニアがFEの業務をできるようになるまでにやったこと
yoshida_ryushin
0
250
自分ひとりから始められる生産性向上の取り組み #でぃーぷらすオオサカ
irof
8
2.1k
EC2からECSへ 念願のコンテナ移行と巨大レガシーPHPアプリケーションの再構築
sumiyae
3
620
Immutable ActiveRecord
megane42
0
120
AWSのLambdaで PHPを動かす選択肢
rinchoku
2
410
React 19でお手軽にCSS-in-JSを自作する
yukukotani
5
590
Featured
See All Featured
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
20
2.4k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.8k
The World Runs on Bad Software
bkeepers
PRO
66
11k
Agile that works and the tools we love
rasmusluckow
328
21k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
YesSQL, Process and Tooling at Scale
rocio
170
14k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3.1k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
6
220
Six Lessons from altMBA
skipperchong
27
3.6k
Navigating Team Friction
lara
183
15k
Learning to Love Humans: Emotional Interface Design
aarron
274
40k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
30
2.1k
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 ΛͲ͏ͭͳ͙͔ͷ
͓ΘΓʹ • େΛѲ͢Δखॿ͚ʹͳͬͨͳΒ͍Ͱ͢ • ͦͷ͏͑ͰݩهࣄղઆهࣄΛಡΈ͢ • ͢Δͱɺ৽ͨͳؾ͖͕ͮ͋Δ͔