Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
OO training homework 3 review and summary
Search
hatelove
July 24, 2012
Technology
11k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
OO training homework 3 review and summary
將大家 homework 2 需注意的地方,延伸思考的部分提出來
hatelove
July 24, 2012
More Decks by hatelove
See All by hatelove
1. 在沙箱中開發
hatelove
12
3.1k
BDD in .NET - TDD 在實務上的最後一塊拼圖
hatelove
4
3k
OO training 基本原則整理
hatelove
2
5.3k
OO training homework 2 review and summary
hatelove
1
4.7k
OO training homework 1 review and summary
hatelove
1
8.2k
Object Oriented Training - Session 4
hatelove
1
5.2k
Object Oriented Training - Session 3
hatelove
1
11k
Object Oriented Training - Session 2
hatelove
1
4.9k
Object Oriented Training - Session 1
hatelove
1
8.4k
Other Decks in Technology
See All in Technology
Cognition AI Japan - ウェビナー2_テストQA_運用監視
cogakira
0
140
その Valkey 使いこなしていますか?
onk
PRO
5
850
Railsで挑む大量データ永続化 〜600億件を永続化するための設計とボトルネックとの戦い〜
occhi
1
310
ai_cording_with_k8s_knowledge.pdf
mochizuki875
1
350
触りたくないデータに、どう触るか AI時代のRBACアクセスガバナンス
ivry_presentationmaterials
0
140
しろおびから始める!ログ活用の第一歩
shumei_ito
0
930
AI時代に必要な脅威モデリング― 変化の速度に負けない理解とリスク判断
masakane55
5
1.3k
DGX Spark でどこまでハッキングができるのか?
kash1064
2
1.2k
全PRの83%が AIレビューだけでマージできるようになった開発組織は その後どうなったか @2026/10
athug
0
150
Running Kotlin + Quarkus with Lambda
nealle
1
470
10年後、Engineering 行為を剥奪されるとして、わたしたちは、どう、何を創ればいいだろうか。 / If Engineering Is Taken Away in 10 Years, How and What Should We Create?
bitkey
PRO
1
170
LambdaWebFunctionsを試してみた / exploring-lambda-web-functions
koukihosaka
0
140
Featured
See All Featured
Tell your own story through comics
letsgokoyo
1
1.1k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
940
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
460
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
46k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
260
Automating Front-end Workflow
addyosmani
1369
210k
How to make the Groovebox
asonas
2
2.5k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
890
Deep Space Network (abreviated)
tonyrice
0
370
Build your cross-platform service in a week with App Engine
jlugia
234
19k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Done Done
chrislema
187
17k
Transcript
Date: 2012/06/28 OO training – homework 3 review
- 2 - Context與工廠職責分離 • new class的動作與使用class的動作分開 – context為使用場景 –
生成物件為工廠的職責 – 使用class都應相依於介面
- 3 - 職責分離 • BL也要遵守單一職責原則 – 商業邏輯不代表得把domain併在一起 • 禁止跨層叫用
– 例如:頁面叫用DA層
- 4 - 依賴於介面 • 物件相依於介面,而非實體 class • Log, Setting,
DA 的介面使用 – 開放封閉原則 – 容易抽換 • 物件結合方式 – constructor – public property – 注意!沒有值給預設值作法的問題 • 應改為 assert / contract 方式的防呆與檢查 • 或透過 overload 無參數 constructor 來給預設值
- 5 - 封裝 • 介面上只開放需要用的方法 – YAGNI ( You
ain’t gonna need it ! ) 原則 • 將實作細節封裝成抽象意義 – 將QueryString封裝成property – 將ViewState封裝成property
Q & A