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
08/27 OOP 設計
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
crazylion
August 27, 2015
Technology
240
0
Share
08/27 OOP 設計
講師: 遠遠
crazylion
August 27, 2015
More Decks by crazylion
See All by crazylion
IDF 使用者心理課程
crazylion
1
150
InTouch: Crossing Social Interaction with Perception
crazylion
0
300
The Twins: Lighting Design Based on Rich Movements
crazylion
0
160
HexDeck: Gamification of Tangibles for Brainstoming
crazylion
0
760
Interaction Design Paradigms
crazylion
0
230
Paradigm Construction & Manifestos in interaction design
crazylion
0
290
批判設計初探
crazylion
0
280
Generative Algorithms 第四章 - Transformation
crazylion
0
240
Generative Algorithms V2 第二章
crazylion
2
310
Other Decks in Technology
See All in Technology
生成AI時代に信頼性をどう保ち続けるか - Policy as Code の実践
akitok_
1
360
AIの揺らぎに“コシ”を与える階層化品質設計
ickx
0
280
ServiceによるKubernetes通信制御ーClusterIPを例に
miku01
1
170
Agent の「自由」と「安全」〜未来に向けて今できること〜
katayan
0
360
AI時代の品質はテストプロセスの作り直し #scrumniigata
kyonmm
PRO
4
1.5k
そのSLO 99.9%、本当に必要ですか? 〜優先度付きSLOによる責任共有の設計思想〜 / Is that 99.9% SLO really necessary? Design philosophy of shared responsibility through prioritized SLOs
vtryo
0
720
セキュリティ対策、何からはじめる? CloudNative環境の脅威モデリングと リスク評価実践入門 #cloudnativekaigi
varu3
5
880
AWS運用におけるAI Agent活用術 / JAWS-UG 神戸 #11 LT大会
genda
1
230
会社説明資料|株式会社ギークプラス ソフトウェア事業部
geekplus_tech
0
230
クラウドネイティブ DB はいかにして制約を 克服したか? 〜進化歴史から紐解く、スケーラブルアーキテクチャ設計指針〜
hacomono
PRO
6
970
How to learn AWS Well-Architected with AWS BuilderCards: Security Edition
coosuke
PRO
0
140
アプリブロック機能のつくりかたと、AIとHTMLの不合理な相性の良さについて
kumamotone
1
260
Featured
See All Featured
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
110
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.4k
The Cult of Friendly URLs
andyhume
79
6.9k
Making Projects Easy
brettharned
120
6.6k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Tell your own story through comics
letsgokoyo
1
920
Git: the NoSQL Database
bkeepers
PRO
432
67k
Test your architecture with Archunit
thirion
1
2.2k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
690
WCS-LA-2024
lcolladotor
0
590
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.1k
Transcript
OOP 物件導向程式設計
OOP ⬜ 講到OOP (Object-Oriented Programming) 物件 導向程式設計 ⬜ 我們想到 …
⬜ Smalltalk,Java,C#,C++(支援) … 物件導向程式 語言(OOPL:Object-Oriented Programming Language)
OOP > OOPL ⬜ 物件導向程式語言是基於OO概念設計的語言 ⬜ 物件導向程式語言不是物件導向程式設計的全部 ⬜ 物件導向程式語言協助易於實現物件導向程式設 計
⬜ 用OOPL寫出不OO的程式 – 程序導向 ⬜ 用非OOPL寫出具OO概念的程式 ◼ (Google:javascript oop)
程序導向 & 物件導向 ⬜ 程序導向 ◼ 功能目的 ◼ 動作 ◼
程序 ◼ 工作流思考模式 (一連串函式呼叫,一連串電腦指令) ▫ UML Sequence diagram ▫ http://www.smileytech. net/school/CS471_Project_WebSite_files/OverallSequence.gif ⬜ 物件導向 ◼ 物件導向就是要基於物件阿 ~ ▫ 專注於將系統裡的各部分抽象為物件,系統為一群物件的交互作用 而運作。 ▫ 個別物件擁有各自的屬性(資料)與方法(動作行為)。 ▫ 某種角度上物件導向概念更貼近現實環境。
OOP 物件導向程式設計 物件導向是一種概念,思維,設計方式。
歷史 ⬜ 1960年代 Kristen Nygaard & Ole-Johan Dahl 物件導向之父 ⬜
An Object is anything to which a concept applies. It is an instance of a concept. ⬜ 宏觀:電視、手機、汽車 … ⬜ 微觀:螢幕、按鍵、輪胎、零組件 … ⬜ 抽象概念:會議、訂購行為 …
源起 ⬜ 程序導向程式設計面臨靈活性,重用性,擴充性 與維護等難題。 ⬜ 物件導向程式設計:將系統各部分視為獨立個體 相互協作。 ◼ 積木 ⬜
類比於現實生活的映射,更容易理解。便於分析、 設計與管理。-- 譬喻法
基本理論 ⬜ 類別 (Class) ◼ 類別(class)是藍圖,規格書,模板。定義該物的屬性(資 料)與方法(動作行為)。 ⬜ 物件 (Object)
◼ 物件(object)是類別的一個實例。 物件 → 類別 (抽象化) 類別 → 物件 (實例化)
基本理論 1 ⬜ 封裝 (Encapsulation) ◼ 資料隱藏 ◼ 降低能見度 →
減低依賴性 (低耦合) ⬜ 繼承 (Inheritance) ◼ Reuse 程式碼重用 ◼ 多重繼承 ⬜ 多型 (Polymorphism) ◼ 同名異式 ◼ 相同名稱的方法可以有不同的程式碼。 ◼ 覆寫 Override
基本理論 2 ⬜ 介面 (Interface) ◼ 描述不同類別的共通行為。 ◼ 規範、規格(開發角度)
進階理論 ⬜ 抽象方法 ⬜ Design Pattern
學習OOP ⬜ 初步可選定一物件導向程式語言學起 ⬜ 建立概念 ⬜ 練習系統分析抽象化 ⬜ 日常生活觀察映射 –
譬喻法
參考資料 ⬜ 不受侷限,多點想像。 ⬜ http://blog.roodo. com/rocksaying/archives/4963259.html ⬜ http://www.kenming.idv. tw/ac_eb_af_cu_af_eo_eu_ascci_a_c_carpad_a