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
120
20250315_LT資料_Kyoto.kt #2_デザインパターン
目次
・なぜデザインパターンなのか
・オブジェクト指向プログラミングの原則
・デザインパターン Strategy
・まとめ
Taipy(タイピー)
March 16, 2025
Tweet
Share
More Decks by Taipy(タイピー)
See All by Taipy(タイピー)
React new features (Activity and useEffectEvent)
taipy
0
0
AI駆動開発 設計書から実装へ
taipy
1
1.2k
JavaのOAuthライブラリ 比較検討
taipy
0
180
Other Decks in Programming
See All in Programming
ノーコードからの脱出 -地獄のデスロード- / Escape from Base44
keisuke69
0
350
CSC305 Lecture 14
javiergs
PRO
0
210
ネストしたdata classの面倒な更新にさようなら!Lensを作って理解するArrowのOpticsの世界
shiita0903
1
240
Webサーバーサイド言語としてのRustについて
kouyuume
1
5k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
680
Inside of Swift Export
giginet
PRO
1
310
エンジニアに事業やプロダクトを理解してもらうためにやってること
murabayashi
0
120
When Dependencies Fail: Building Antifragile Applications in a Fragile World
selcukusta
0
120
Reactive Thinking with Signals and the Resource API
manfredsteyer
PRO
0
120
AIと人間の共創開発!OSSで試行錯誤した開発スタイル
mae616
2
870
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
490
SwiftDataを使って10万件のデータを読み書きする
akidon0000
0
250
Featured
See All Featured
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
Speed Design
sergeychernyshev
32
1.2k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
4 Signs Your Business is Dying
shpigford
186
22k
It's Worth the Effort
3n
187
28k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
2
250
We Have a Design System, Now What?
morganepeng
54
7.9k
Designing for humans not robots
tammielis
254
26k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
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 ※直前までのスライドで引用していないものをここに記載