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
20250315_LT資料_Kyoto.kt #2_デザインパターン
Search
Taipy(タイピー)
March 16, 2025
Programming
0
96
20250315_LT資料_Kyoto.kt #2_デザインパターン
目次
・なぜデザインパターンなのか
・オブジェクト指向プログラミングの原則
・デザインパターン Strategy
・まとめ
Taipy(タイピー)
March 16, 2025
Tweet
Share
More Decks by Taipy(タイピー)
See All by Taipy(タイピー)
AI駆動開発 設計書から実装へ
taipy
1
860
JavaのOAuthライブラリ 比較検討
taipy
0
140
Other Decks in Programming
See All in Programming
Six and a half ridiculous things to do with Quarkus
hollycummins
0
130
非同期jobをtransaction内で 呼ぶなよ!絶対に呼ぶなよ!
alstrocrack
0
560
ネイティブ製ガントチャートUIを作って学ぶUICollectionViewLayoutの威力
jrsaruo
0
140
Playwrightはどのようにクロスブラウザをサポートしているのか
yotahada3
7
2.3k
CSC509 Lecture 04
javiergs
PRO
0
300
開発者への寄付をアプリ内課金として実装する時の気の使いどころ
ski
0
360
LLMとPlaywright/reg-suitを活用した jQueryリファクタリングの実際
kinocoboy2
4
680
Go言語の特性を活かした公式MCP SDKの設計
hond0413
1
200
デミカツ切り抜きで面倒くさいことはPythonにやらせよう
aokswork3
0
210
Building, Deploying, and Monitoring Ruby Web Applications with Falcon (Kaigi on Rails 2025)
ioquatix
3
1.1k
アメ車でサンノゼを走ってきたよ!
s_shimotori
0
200
CSC305 Lecture 06
javiergs
PRO
0
210
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
30
2.9k
Being A Developer After 40
akosma
91
590k
GraphQLとの向き合い方2022年版
quramy
49
14k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.1k
It's Worth the Effort
3n
187
28k
BBQ
matthewcrist
89
9.8k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
4 Signs Your Business is Dying
shpigford
185
22k
Documentation Writing (for coders)
carmenintech
75
5k
Transcript
デザインパターン
自己紹介 名前:Taipy(たいぴー) 出身:香川県小豆島 趣味:読書、アニメ、筋トレ
自己紹介 IT業界に入ったきっかけ 膝の靭帯断裂 ・前十字靭帯 ・内側側副靱帯
目次 ・なぜデザインパターンなのか ・オブジェクト指向プログラミングの原則 ・デザインパターン Strategy ・まとめ
AIの台頭 AI コードが書ける 人間 難易度が高い問題 設計 アーキテクチャ
Amazonの説明から一部抜粋 2004年には増補改訂版が刊 行され、2020年には第31刷ま で達するという人気のロングセ ラーとなっています。 2001年に初版が刊行 https://amzn.asia/d/7nyRI8H
学んだ設計原則 アプリケーション内の変更する部分を特定し、不変な 部分と分離する。
Strategy 最も強い者が生き残るのではない、最 も賢い者が生き残るのでもない、唯一 生き残るのは変化できる者である - チャールズ・ダーウィン デザインパターンその1
概要 S t r a t e g y パターンは一連のアルゴリズム
を定 義してカプセル化 し、交換できるようにします。 Strategy パターンを使うと、 アルゴリズムを利用す るクライアントとは独立してアルゴリ ズムを変更でき ます。
いつ使うのか? 1. アルゴリズムの切り替えが必要 2. 拡張性 「アルゴリズム」 →特定の問題を解決するために定められた手順や計算方法 →要するに、「倒し方」
None
None
None
アルゴリズムを切り出す
Before After
Before
None
まとめ ・アルゴリズムを頻繁に変更する場合は →ストラテジーパターンを使おう!
参考文献 ・Eric Freeman (著), Elisabeth Robso (著), 佐藤 直生 (監修)「Head
Firstデザイン パターン 第2版 ―頭とからだで覚えるデザインパターンの基本」, https://amzn.asia/d/aXDdbrL ・Refactoring.Guru「デザインパターン」 https://refactoring.guru/ja/design-patterns ※直前までのスライドで引用していないものをここに記載