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
アスペクト指向プログラミング
Search
ToruTakagi
May 16, 2018
Programming
0
210
アスペクト指向プログラミング
研修先で5分間のLTをする際に作りました
ToruTakagi
May 16, 2018
Tweet
Share
More Decks by ToruTakagi
See All by ToruTakagi
Webフロントの変化 ~時代はPWAへ?~
torutakagi
0
85
Vue.js
torutakagi
0
130
Other Decks in Programming
See All in Programming
tool ディレクティブを導入してみた感想
sgash708
1
160
Jakarta EE Core Profile and Helidon - Speed, Simplicity, and AI Integration
ivargrimstad
0
310
レガシープロジェクトで最大限AIの恩恵を受けられるようClaude Codeを利用する
tk1351
4
1.6k
開発チーム・開発組織の設計改善スキルの向上
masuda220
PRO
18
9.7k
私の後悔をAWS DMSで解決した話
hiramax
4
180
Google I/O recap web編 大分Web祭り2025
kponda
0
2.9k
Kiroの仕様駆動開発から見えてきたAIコーディングとの正しい付き合い方
clshinji
1
200
プロポーザル駆動学習 / Proposal-Driven Learning
mackey0225
2
370
Updates on MLS on Ruby (and maybe more)
sylph01
1
170
旅行プランAIエージェント開発の裏側
ippo012
2
740
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
160
Improving my own Ruby thereafter
sisshiki1969
1
150
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
42
2.8k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.8k
A Tale of Four Properties
chriscoyier
160
23k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
Statistics for Hackers
jakevdp
799
220k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Art, The Web, and Tiny UX
lynnandtonic
302
21k
Intergalactic Javascript Robots from Outer Space
tanoku
272
27k
We Have a Design System, Now What?
morganepeng
53
7.8k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
126
53k
A designer walks into a library…
pauljervisheath
207
24k
Transcript
Aspect Oriented Programming
注意点 言葉の定義を変えてる 2 2018/05/18
What is AOP OOPを倒すもの VS 3 2018/05/18
What is AOP OOPの弱点を補う 4 2018/05/18
AOPって何ができる? 5 2018/05/18
出力結果は? public class Main { public static void main(省略) {
} } 6 2018/05/18
出力結果 C:¥>java Main Hello World!! 7 2018/05/18
Aspectって何ができる? 既存のシステムをいじらず ・変数の値を変更 ・メソッドの中身を書き換え ・特定のタイミングで処理を行う 8 2018/05/18
AOPが生まれた背景 ✔ ソフトウェア工学の視点 ✔ OOPの視点 9 2018/05/18
✔凝集度 クラスに無駄な機能が入ってないか ✔結合度 クラスの関係性 What is Cohesion and Coupling 10
2018/05/18
凝集度 高い 結合度 低い 一般的 11 2018/05/18
1つの関数に全部書けば 結合度低くね? 極論 12 2018/05/18
13 図1. アスペクト指向の考え方の原点[1] [1]Kurowasi, “時代が来るかも?アスペクト指向プログラミング,AspcetJ言語とは何か,” 2018/05/18
AOPが生まれた背景 ✔ ソフトウェア工学の視点 ✔ OOPの視点 14 2018/05/18
グループ分けの単位 What is Concern(関心事) 15 2018/05/18
ブログシステム 16 2018/05/18
OOPの限界 ログイン機能 ページを返す機能 記事登録機能 ユーザ情報取得 一致するか判定 欲しいページ取得 記事をDBに登録 ログを登録 17
図2. ブログシステム 2018/05/18
OOPの限界 ログイン機能 ページを返す機能 記事登録機能 ユーザ情報取得 一致するか判定 欲しいページ取得 記事をDBに登録 ログを登録 18
図3. OOPでの関心事の分離 2018/05/18
Crosscutting Concern ログイン機能 ページを返す機能 記事登録機能 ユーザ情報取得 一致するか判定 欲しいページ取得 記事をDBに登録 ログを登録
19 図4. 横断的関心事 2018/05/18
Aspect ログイン機能 ページを返す機能 記事登録機能 ユーザ情報取得 一致するか判定 欲しいページ取得 記事をDBに登録 ログを登録 アスペクト
20 図5. アスペクトによる横断的関心事の解決 2018/05/18
OOP 21 図6. オブジェクト指向の目線 2018/05/18
AOP 22 図7. アスペクト指向の目線 2018/05/18
複数の視点から 関心事の分離が可能 AOPにって限界突破 23 2018/05/18
✔OOPの問題点 ◆結合の問題 ◆横断的関心事の問題 ✔AOPによる解決 ◆コンパイラが結合 ◆複数の視点で見れる まとめ 24 2018/05/18
Yes Silver Bullet 25 2018/05/18