没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论


















Table of Contents
Chapter 1. Welcome to Design Patterns....................................................... 1
Section 1.1. It started with a simple SimUDuck app....................................................................................................................... 2
Section 1.2. But now we need the ducks to FLY............................................................................................................................. 3
Section 1.3. But something went horribly wrong........................................................................................................................... 4
Section 1.4. Joe thinks about inheritance....................................................................................................................................... 5
Section 1.5. Sharpen your pencil..................................................................................................................................................... 5
Section 1.6. How about an interface?............................................................................................................................................. 6
Section 1.7. What would you do if you were Joe?........................................................................................................................... 7
Section 1.8. The one constant in software development................................................................................................................ 8
Section 1.9. Sharpen your pencil.................................................................................................................................................... 8
Section 1.10. Zeroing in on the problem......................................................................................................................................... 9
Section 1.11. Separating what changes from what stays the same............................................................................................... 10
Section 1.12. Designing the Duck Behaviors.................................................................................................................................. 11
Section 1.13. Implementing the Duck Behaviors.......................................................................................................................... 13
Section 1.14. There are no Dumb Questions................................................................................................................................. 14
Section 1.15. Sharpen your pencil.................................................................................................................................................. 14
Section 1.16. Integrating the Duck Behavior................................................................................................................................. 15
Section 1.17. More Integration...................................................................................................................................................... 16
Section 1.18. Testing the Duck code.............................................................................................................................................. 18
Section 1.19. Setting behavior dynamically.................................................................................................................................. 20
Section 1.20. The Big Picture on encapsulated behaviors............................................................................................................ 22
Section 1.21. HAS-A can be better than IS-A................................................................................................................................ 23
Section 1.22. Speaking of Design Patterns................................................................................................................................... 24
Section 1.23. Design Puzzle........................................................................................................................................................... 25
Section 1.24. Overheard at the local diner.................................................................................................................................... 26
Section 1.25. Overheard in the next cubicle.................................................................................................................................. 27
Section 1.26. The power of a shared pattern vocabulary............................................................................................................. 28
Section 1.27. How do I use Design Patterns?............................................................................................................................... 29
Section 1.28. There are no Dumb Questions................................................................................................................................ 29
Section 1.29. Skeptical Developer-Friendly Patterns Guru......................................................................................................... 30
Section 1.30. Tools for your Design Toolbox................................................................................................................................ 32
Section 1.31. Design Puzzle Solution............................................................................................................................................ 34
Section 1.32. Solutions.................................................................................................................................................................. 35
Chapter 1. Welcome to Design Patterns
Chapter 1. Welcome to Design Patterns
Head First Design Patterns By Eric Freeman, Elisabeth Freeman, Bert Bates, Kathy Sierra
ISBN: 0596007124 Publisher: O'Reilly
Prepared for Ann Cherkis, Safari ID: [email protected]
Print Publication Date: 2004/10/25 User number: 1673621 Copyright 2008, Safari Books Online, LLC.
This PDF is exclusively for your use in accordance with the Safari Terms of Service. No part of it may be reproduced or transmitted in any form by any means without the prior
written permission for reprints and excerpts from the publisher. Redistribution or other use that violates the fair use priviledge under U.S. copyright laws (see 17 USC107) or that
otherwise violates the Safari Terms of Service is strictly prohibited.
www.it-ebooks.info

WKLVLVDQHZFKDSWHU
6RPHRQHKDVDOUHDG\VROYHG\RXUSUREOHPV,QWKLVFKDSWHU\RX¶OOOHDUQ
ZK\DQGKRZ\RXFDQH[SORLWWKHZLVGRPDQGOHVVRQVOHDUQHGE\RWKHUGHYHORSHUVZKR¶YH
EHHQGRZQWKHVDPHGHVLJQSUREOHPURDGDQGVXUYLYHGWKHWULS%HIRUHZH¶UHGRQHZH¶OO
ORRNDWWKHXVHDQGEHQH¿WVRIGHVLJQSDWWHUQVORRNDWVRPHNH\22GHVLJQSULQFLSOHVDQG
ZDONWKURXJKDQH[DPSOHRIKRZRQHSDWWHUQZRUNV7KHEHVWZD\WRXVHSDWWHUQVLVWRORDG
\RXUEUDLQZLWKWKHPDQGWKHQUHFRJQL]HSODFHVLQ\RXUGHVLJQVDQGH[LVWLQJDSSOLFDWLRQV
ZKHUH\RXFDQDSSO\WKHP,QVWHDGRIFRGHUHXVHZLWKSDWWHUQV\RXJHWH[SHULHQFHUHXVH
:HOFRPHWR
'HVLJQ3DWWHUQV
Intro to Design Patterns
1RZWKDWZH·UHOLYLQJ
LQ2EMHFWYLOOHZH·YHMXVWJRW
WRJHWLQWR'HVLJQ3DWWHUQV
HYHU\RQHLVGRLQJWKHP6RRQ
ZH·OOEHWKHKLWRI-LPDQG
%HWW\·V:HGQHVGD\QLJKW
SDWWHUQVJURXS
4
5
4
Chapter 1. Welcome to Design Patterns Page 1 Return to Table of Contents
Chapter 1. Welcome to Design Patterns
Head First Design Patterns By Eric Freeman, Elisabeth Freeman, Bert Bates, Kathy Sierra
ISBN: 0596007124 Publisher: O'Reilly
Prepared for Ann Cherkis, Safari ID: [email protected]
Print Publication Date: 2004/10/25 User number: 1673621 Copyright 2008, Safari Books Online, LLC.
This PDF is exclusively for your use in accordance with the Safari Terms of Service. No part of it may be reproduced or transmitted in any form by any means without the prior
written permission for reprints and excerpts from the publisher. Redistribution or other use that violates the fair use priviledge under U.S. copyright laws (see 17 USC107) or that
otherwise violates the Safari Terms of Service is strictly prohibited.
www.it-ebooks.info

&KDSWHU
1\[\IZ\ML_Q\PI[QUXTM;QU=,]KSIXX
2WM_WZS[NWZIKWUXIVa\PI\UISM[IPQOPTa[]KKM[[N]TL]KSXWVL
[QU]TI\QWVOIUM;QU=,]KS<PMOIUMKIV[PW_ITIZOM^IZQM\aWN
L]KS[XMKQM[[_QUUQVOIVLUISQVOY]IKSQVO[W]VL[<PMQVQ\QIT
LM[QOVMZ[WN \PM[a[\MU][ML[\IVLIZL77\MKPVQY]M[IVLKZMI\ML
WVM,]KS[]XMZKTI[[NZWU_PQKPITTW\PMZL]KS\aXM[QVPMZQ\
'XFN
TXDFN
VZLP
GLVSOD\
27+(5GXFNOLNHPHWKRGV
GLVSOD\^
ORRNVOLNHDPDOODUG`
0DOODUG'XFN
GLVSOD\^
ORRNVOLNHDUHGKHDG`
5HGKHDG'XFN
/RWVRIRWKHUW\SHVRIGXFNV
LQKHULWIURPWKH'XFNFODVV
(DFKGXFNVXEW\SH
LVUHVSRQVLEOHIRU
LPSOHPHQWLQJLWVRZQ
GLVSOD\EHKDYLRU
IRUKRZLWORRNVRQ
WKHVFUHHQ
$OOGXFNVTXDFNDQGVZLPWKH
VXSHUFODVVWDNHVFDUHRIWKH
LPSOHPHQWDWLRQFRGH
1V\PMTI[\aMIZ\PMKWUXIVaPI[JMMV]VLMZQVKZMI[QVOXZM[[]ZM
NZWUKWUXM\Q\WZ[)N\MZI_MMSTWVOWNN[Q\MJZIQV[\WZUQVO
[M[[QWVW^MZOWTN\PMKWUXIVaM`MK]\Q^M[\PQVSQ\¼[\QUMNWZIJQO
QVVW^I\QWV<PMaVMML[WUM\PQVOZMITTaQUXZM[[Q^M\W[PW_I\\PM
]XKWUQVO[PIZMPWTLMZ[UMM\QVOQV5I]QVM`\_MMS
7KHGLVSOD\PHWKRGLV
DEVWUDFWVLQFHDOOGXFN
VXEW\SHVORRNGLIIHUHQW
6LP8'XFN
Chapter 1. Welcome to Design Patterns Page 2 Return to Table of Contents
Chapter 1. Welcome to Design Patterns
Head First Design Patterns By Eric Freeman, Elisabeth Freeman, Bert Bates, Kathy Sierra
ISBN: 0596007124 Publisher: O'Reilly
Prepared for Ann Cherkis, Safari ID: [email protected]
Print Publication Date: 2004/10/25 User number: 1673621 Copyright 2008, Safari Books Online, LLC.
This PDF is exclusively for your use in accordance with the Safari Terms of Service. No part of it may be reproduced or transmitted in any form by any means without the prior
written permission for reprints and excerpts from the publisher. Redistribution or other use that violates the fair use priviledge under U.S. copyright laws (see 17 USC107) or that
otherwise violates the Safari Terms of Service is strictly prohibited.
www.it-ebooks.info

LQWURWR'HVLJQ3DWWHUQV
\RXDUHKHUH
-RH
,MXVWQHHGWRDGGDÁ\
PHWKRGLQWKH'XFNFODVVDQG
WKHQDOOWKHGXFNVZLOOLQKHULWLW
1RZ·VP\WLPHWRUHDOO\VKRZP\
WUXH22JHQLXV
$OOVXEFODVVHV
LQKHULWIO\
:KDW-RHDGGHG
<PMM`MK]\Q^M[LMKQLML\PI\ÆaQVOL]KS[Q[R][\_PI\\PM
[QU]TI\WZVMML[\WJTW_I_Ia\PMW\PMZL]KS[QUKWUXM\Q\WZ[
)VLWN KW]Z[M2WM¼[UIVIOMZ\WTL\PMUQ\¼TTJMVWXZWJTMU
NWZ2WM\WR][\_PQX[WUM\PQVO]XQVI_MMS¹)N\MZITTº[IQL
2WM¼[JW[[¹PM¼[IV77XZWOZIUUMZPW_PIZLKIVQ\JM'º
*]\VW__MVMML\PML]KS[\W.4A
2WKHU'XFNW\SHV
'XFN
TXDFN
VZLP
GLVSOD\
IO\
27+(5GXFNOLNHPHWKRGV
GLVSOD\^
ORRNVOLNHDPDOODUG`
0DOODUG'XFN
GLVSOD\^
ORRNVOLNHDUHGKHDG`
5HGKHDG'XFN
:KDWZHZDQW
Chapter 1. Welcome to Design Patterns Page 3 Return to Table of Contents
Chapter 1. Welcome to Design Patterns
Head First Design Patterns By Eric Freeman, Elisabeth Freeman, Bert Bates, Kathy Sierra
ISBN: 0596007124 Publisher: O'Reilly
Prepared for Ann Cherkis, Safari ID: [email protected]
Print Publication Date: 2004/10/25 User number: 1673621 Copyright 2008, Safari Books Online, LLC.
This PDF is exclusively for your use in accordance with the Safari Terms of Service. No part of it may be reproduced or transmitted in any form by any means without the prior
written permission for reprints and excerpts from the publisher. Redistribution or other use that violates the fair use priviledge under U.S. copyright laws (see 17 USC107) or that
otherwise violates the Safari Terms of Service is strictly prohibited.
www.it-ebooks.info
剩余618页未读,继续阅读
资源评论


leetesla
- 粉丝: 12
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- 三位厦门大学的学生面对小学期的python大作业他们将用什么样的作品水水而过
- QT6 画家 QPainter 的源代码带注释 1300 行 本类奠定了 QT 的绘图基础
- 基于 MySQL 与 Python 的选课大作业及校招填表辅助系统
- 网站建设方案(人才网).doc
- 新建文件夹福建省莆田市基于云计算的电子政务公共平台顶层设计【阶段成果】v1.5.doc
- 行业网站建设方案.doc
- 基于JSP的酒店客房管理系统.doc
- 武汉大学分析化学课件-第26章-分析仪器测量电路、信号处理及计算机应用基础.ppt
- 基于网络环境的集体备课研究课题研究报告.docx
- 网络营销SEO精简版.pptx
- 软件委托开发流程及相关规范(211215095509).pdf
- 数控铣床加工中心编程实例PPT培训课件.ppt
- 计算机网络基础(继续教育试题及答案).docx
- 网络会计对传统会计的影响及发展【会计实务操作教程】.pptx
- 行政事业单位会计信息化建设路径.doc
- 网络营销内涵.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制
