资源详情

实战Python设计模式:可复用面向对象软件开发实践(博文视点出品)

实战Python设计模式:可复用面向对象软件开发实践(博文视点出品)-电子书下载


作者: 薛卫国/薛卫民
出版社: 电子工业出版社
出品方: 博文视点
出版年: 2020-3
页数: 236
定价: 59
装帧: 平装
ISBN: 9787121379598

下载次数:0


本站推荐

书籍资料

  • 内容简介
  • 作者介绍
  • 书籍目录

作为可复用面向对象软件开发的基础,设计模式集合了很多软件开发领域专家的宝贵经验和良好实践,其重要性不言而喻。但是,学习设计模式的过程并不是一帆风顺的,对于缺乏面向对象开发经验的设计者尤其如此。
就像在游泳池中不能学会海战一样,我们不应该指望理解几个似是而非的例子就可以在实际开发中灵活运用设计模式。学习设计模式最好的方式就是在实际的开发中边学边练边体会。《实战Python设计模式:可复用面向对象软件开发实践》利用Python 的标准GUI 工具包tkinter,通过可执行的示例对23 个设计模式逐个进行说明。这样一方面可以使读者了解真实的软件开发工作中每个设计模式的运用场景和想要解决的问题;另一方面通过对这些问题的解决过程进行说明,让读者明白在编写代码时如何判断使用设计模式的利弊,并合理运用设计模式。
对设计模式感兴趣而且希望随学随用的读者通过本书可以快速跨越从理解到运用的门槛;希望学习Python GUI 编程的读者可以将本书中的示例作为设计和开发的参考;使用Python 语言进行图像分析、数据处理工作的读者可以直接以本书中的示例为基础,迅速构建自己的系统架构。

薛卫国
大连某日资嵌入式软件开发公司架构组负责人、CSDN博客专家,埋头于C++开发第一线二十余年,擅长面向对象设计、编程,熟练掌握UML、安卓应用、微信小程序开发,精通Python、Java语言并长期研究各种编程语言的设计模式。公众号“面向对象思考”。
薛卫民
1999年毕业于东北大学,2003年赴日本从事软件开发工作至今,现为日本某知名电子医疗设备制造公司框架设计开发团队的主要成员,负责医疗设备软件的框架设计和开发工作。拥有13年面向对象设计开发经验·,熟练掌握统一建模语言(UML),精通C++、Python、C#等编程语言。

第1章示例软件介绍···········································································1
1.1准备工作············································································1
1.1.1源代码下载·································································1
1.1.2安装开发环境······························································1
1.2启动·······································································

··········1
1.3功能说明············································································2
1.4功能概要············································································3
1.4.1编辑··········································································3
1.4.2逻辑调试····································································6
1.4.3文件管理····································································6
1.4.4代码生成····································································6
第2章创建型模式··············································································7
2.1抽象工厂模式······································································7
2.1.1问题说明····································································7
2.1.2模式结构····································································8
2.1.3示例代码····································································9
2.1.4实战运用···································································12
2.1.5效果讨论···································································19
2.1.6提示和技巧································································19
2.2工厂方法模式·····································································19
2.2.1问题说明···································································19
2.2.2模式结构···································································21
2.2.3示例代码···································································22
2.2.4实战运用···································································24
2.2.5效果讨论···································································26
2.2.6提示和技巧································································26
2.3原型模式···········································································27
2.3.1问题说明···································································27
2.3.2模式结构···································································28
2.3.3示例代码···································································29
2.3.4实战运用···································································30
2.3.5效果讨论···································································34
2.3.6提示和技巧································································34
2.4生成器模式········································································35
2.4.1问题说明···································································35
2.4.2模式结构···································································37
2.4.3示例代码···································································38
2.4.4实战运用···································································42
2.4.5效果讨论···································································43
2.4.6提示和技巧································································44
2.5单例模式···········································································44
2.5.1问题说明···································································44
2.5.2模式结构···································································45
2.5.3示例代码···································································46
2.5.4实战运用···································································47
2.5.5效果讨论···································································50
2.5.6提示和技巧································································50
2.6创建型模式小结··································································50
第3章结构型模式·············································································52
3.1组合模式···········································································52
3.1.1问题说明···································································52
3.1.2模式结构···································································53
3.1.3示例代码···································································54
3.1.4实战运用···································································57
3.1.5效果讨论···································································60
3.1.6提示和技巧································································61
3.2适配器模式········································································61
3.2.1问题说明···································································61
3.2.2模式结构···································································64
3.2.3示例代码···································································64
3.2.4实战运用···································································66
3.2.5效果讨论···································································69
3.2.6提示和技巧································································69
3.3桥接模式···········································································70
3.3.1问题说明···································································70
3.3.2模式构造···································································72
3.3.3示例代码···································································73
3.3.4实战运用···································································76
3.3.5效果讨论···································································79
3.3.6提示和技巧································································80
3.4装饰器模式········································································80
3.4.1问题说明···································································80
3.4.2模式结构···································································81
3.4.3示例代码···································································82
3.4.4实战运用···································································84
3.4.5效果讨论···································································87
3.4.6提示和技巧································································88
3.5代理模式···········································································88
3.5.1问题说明···································································88
3.5.2模式结构···································································90
3.5.3示例代码···································································91
3.5.4实战运用···································································94
3.5.5效果讨论···································································96
3.5.6提示和技巧································································96
3.6享元模式···········································································96
3.6.1问题说明···································································96
3.6.2模式结构···································································97
3.6.3示例代码···································································98
3.6.4实战运用·································································100
3.6.5效果讨论·································································104
3.6.6提示和技巧······························································104
3.7外观模式·········································································104
3.7.1问题说明·································································104
3.7.2模式结构·································································106
3.7.3实战运用·································································106
3.7.4效果讨论·································································109
3.7.5提示和技巧······························································110
3.8结构型模式小结································································110
第4章行为模式··············································································111
4.1职责链模式······································································111
4.1.1问题说明·································································111
4.1.2模式结构·································································113
4.1.3示例代码·································································113
4.1.4实战运用·································································115
4.1.5效果讨论·································································119
4.1.6提示和技巧······························································119
4.2观察者模式······································································119
4.2.1问题说明·································································119
4.2.2模式结构·································································120
4.2.3示例代码·································································121
4.2.4实战运用·································································123
4.2.5效果讨论·································································127
4.2.6提示和技巧······························································127
4.3中介者模式······································································128
4.3.1问题说明·································································128
4.3.2模式结构·································································129
4.3.3示例代码·································································130
4.3.4实战运用·································································132
4.3.5效果讨论·································································133
4.3.6提示和技巧······························································134
4.4策略模式·········································································134
4.4.1问题说明·································································134
4.4.2模式结构·································································136
4.4.3示例代码·································································137
4.4.4实战运用·································································139
4.4.5效果讨论·································································144
4.4.6提示和技巧······························································145
4.5命令模式·········································································145
4.5.1问题说明·································································145
4.5.2模式结构·································································146
4.5.3示例代码·································································148
4.5.4实战运用·································································150
4.5.5效果讨论·································································154
4.5.6提示和技巧······························································154
4.6备忘录模式······································································155
4.6.1问题说明·································································155
4.6.2模式结构·································································156
4.6.3示例代码·································································157
4.6.4实战运用·································································159
4.6.5效果讨论·································································161
4.6.6提示和技巧······························································161
4.7模板方法模式···································································162
4.7.1问题说明·································································162
4.7.2模式结构·································································163
4.7.3示例代码·································································164
4.7.4实战运用·································································168
4.7.5效果讨论·································································170
4.7.6提示和技巧······························································170
4.8迭代器模式······································································171
4.8.1问题说明·································································171
4.8.2模式结构·································································172
4.8.3示例代码·································································173
4.8.4实战运用·································································176
4.8.5效果讨论·································································179
4.8.6提示和技巧······························································179
4.9访问者模式······································································180
4.9.1问题说明·································································180
4.9.2模式结构·································································182
4.9.3示例代码·································································183
4.9.4实战运用·································································187
4.9.5效果讨论·································································191
4.9.6提示和技巧······························································192
4.10状态模式········································································193
4.10.1问题说明·······························································193
4.10.2模式结构·······························································194
4.10.3示例代码·······························································195
4.10.4实战运用·······························································203
4.10.5效果讨论·······························································206
4.10.6提示和技巧····························································206
4.11解释器模式·····································································206
4.11.1问题说明·······························································206
4.11.2模式结构·······························································207
4.11.3示例代码·······························································208
4.11.4实战运用·······························································214
4.11.5效果讨论·······························································219
4.11.6提示和技巧····························································220
4.12行为模式小结··································································220