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
デザパタ勉強会!Bridgeパターン
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Java女子部
November 29, 2022
Programming
140
0
Share
デザパタ勉強会!Bridgeパターン
https://javajo.doorkeeper.jp/events/144579
Java女子部
November 29, 2022
More Decks by Java女子部
See All by Java女子部
モダンJava再入門ハンズオン Java in Education For JUGs
javawomen
0
180
デザインパターン勉強会(Facade&Mediator)
javawomen
0
210
みんな大好きJava 8から9月リリースJava 17まで!最近のJava事情あれこれ / Java catch up from 8 to 17
javawomen
2
1.2k
お客様の中にJava女子部とお付き合いしてくださる方はいませんか?
javawomen
0
360
【子ども向けハンズオン】 ゲームで学ぼう、プログラミング!
javawomen
0
870
Java女子部について
javawomen
1
92
Other Decks in Programming
See All in Programming
Surviving Black Friday: 329 billion requests with Falcon!
ioquatix
0
3k
WebAssembly を読み込むベストプラクティス 2026年春版 / Best Practices for Loading WebAssembly (Spring 2026)
petamoriken
5
1.1k
AIと共に生きる技術選定 2026
sgash708
0
130
AIベース静的検査器の偽陽性率を抑える工夫3選
orgachem
PRO
4
450
Structured Concurrency, Scoped Values and Joiners in the JDK 25 26 27
josepaumard
1
150
書籍「ユーザーストーリーマッピング」が私のバイブル
asumikam
4
490
AgentCore Optimizationを始めよう!
licux
3
230
[RubyKaigi 2026] Require Hooks
palkan
1
310
ついに来た!本格的なマルチクラウド時代の Google Cloud
maroon1st
0
410
mruby on C#: From VM Implementation to Game Scripting (RubyKaigi 2026)
hadashia
2
1.7k
Lightning-Fast Method Calls with Ruby 4.1 ZJIT / RubyKaigi 2026
k0kubun
3
2.7k
(Re)make Regexp in Ruby: Democratizing internals for the JIT
makenowjust
3
1k
Featured
See All Featured
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
130
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.2k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
350
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
300
How to Think Like a Performance Engineer
csswizardry
28
2.6k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
320
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
130
Done Done
chrislema
186
16k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
360
Google's AI Overviews - The New Search
badams
0
1k
Agile that works and the tools we love
rasmusluckow
331
21k
Transcript
デザパタ勉強会! Bridgeパターン 2022/11/26
Bridgeパターンとは? 「機能のクラス階層」と「実装のクラス階層」を分けて実装する実装パターン。 実装クラスのインスタンスを機能クラスに渡すことで二つの世界の橋渡しをするのでブ リッジパターンという! Animal SleepingAnimal DogImpl RabbitImpl LionImpl AnimalImpl
CatImpl 橋渡し! 機能のクラス階層 実装のクラス階層
Bridgeパターンにすると何が嬉しい? 実装のクラスに影響を与えずに機能の追加ができる! CatImpl DogImpl RabbitImpl RionImpl AnimalImpl Animal Animalに共通の「寝る」機能を追 加しようかな〜
SleepingAnimal こっちの変更がいらない!
Bridgeパターンの主な人物像 Abstraction • class • 機能クラス Imprementor • 実装クラス •
abstractクラス • Abstractionを保持する Refind Abstraction • 機能クラスの拡張 • extends Abstraction Concrete Imprementior • 実装クラスの拡張 • class • extends Imprementor public class Animal { private AnimalImpl impl;