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
150
ゆめみ大技林製作委員会の立ち上げの話 / 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
730
Coding Swift with Visual Studio Code and Docker
usamik26
0
480
Swift Extension for Visual Studio Code
usamik26
2
980
Other Decks in Programming
See All in Programming
Amazon Q Developer Proで効率化するAPI開発入門
seike460
PRO
0
120
PRレビューのお供にDanger
stoticdev
1
230
第3回関東Kaggler会_AtCoderはKaggleの役に立つ
chettub
3
1.2k
Serverless Rust: Your Low-Risk Entry Point to Rust in Production (and the benefits are huge)
lmammino
1
150
AIプログラミング雑キャッチアップ
yuheinakasaka
18
4.6k
CI改善もDatadogとともに
taumu
0
200
From the Wild into the Clouds - Laravel Meetup Talk
neverything
0
150
Rails 1.0 のコードで学ぶ find_by* と method_missing の仕組み / Learn how find_by_* and method_missing work in Rails 1.0 code
maimux2x
1
240
PHPカンファレンス名古屋2025 タスク分解の試行錯誤〜レビュー負荷を下げるために〜
soichi
1
680
ML.NETで始める機械学習
ymd65536
0
230
メンテが命: PHPフレームワークのコンテナ化とアップグレード戦略
shunta27
0
300
dbt Pythonモデルで実現するSnowflake活用術
trsnium
0
260
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Being A Developer After 40
akosma
89
590k
Raft: Consensus for Rubyists
vanstee
137
6.8k
GraphQLの誤解/rethinking-graphql
sonatard
68
10k
Bash Introduction
62gerente
611
210k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Become a Pro
speakerdeck
PRO
26
5.2k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
133
33k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Building an army of robots
kneath
303
45k
Scaling GitHub
holman
459
140k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.3k
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 ΛͲ͏ͭͳ͙͔ͷ
͓ΘΓʹ • େΛѲ͢Δखॿ͚ʹͳͬͨͳΒ͍Ͱ͢ • ͦͷ͏͑ͰݩهࣄղઆهࣄΛಡΈ͢ • ͢Δͱɺ৽ͨͳؾ͖͕ͮ͋Δ͔