英 敏捷软体开发:原则、模式与实践


英 敏捷软体开发:原则、模式与实践

文章插图
敏捷软体开发:原则、模式与实践(英)【英 敏捷软体开发:原则、模式与实践】本书旨在指导 。NET程式设计师学习构建软体的最佳实践 , 从而创建更好的设计并提升 。NET套用的质量 。书中使用真实案例讲解如何用极限编程来设计、测试、重构和结对编程 , 包含了极具价值的可重用的C#原始码 , 还重点讲述了如何使用UML和设计模式解决面向客户系统的问题 。本书适于软体开发和管理人员提高自身水平学习之用 , 也适于用作高校计算机专业本科生、研究生以及软体学院的软体工程和软体开发相关课程的教材或参考书 。
基本介绍书名:敏捷软体开发:原则、模式与实践(C#版 英文注释版)
作者:(美)马丁 着
原版名称:Agile Principles, Patterns, and Practices in C#
ISBN:9787115165077
类别:程式设计 , 软体开发
页数:732
定价:89.00
出版社:人民邮电出版社
出版时间:2008-1-1
装帧:平装
开本:16开
内容提要本书中 , 享誉全球的软体开发专家和软体工程大师RobertC.Martin深入而生动地使用真实案例讲解了面向对象基本原则、重要的设计模式、UML和敏捷实践等程式设计师必备的知识 。本书于2003年荣获第13届Jolt大奖 , 是C++和Java程式设计师提高自身水平的绝佳教材 , 也适于用作高校计算机、软体工程专业相关课程的教材或参考书 。编辑推荐软体开发的不朽经典 , 生动阐述面向对象原则、敏捷实践、UML和模式 , 大量C#实战示例 , 让你亲历现场 , 丰富的辞彙和背景注释 , 助你轻鬆读经典 。“我最喜爱的技术作家Robert Martin善于通过实战展示技术 , 让读者能够以自己喜欢的方式逐步理解……请把Bob大叔当作你在敏捷世界里的导师 。”——Chris Sells , NET资深技术专家 , 微软“软体传奇人物”“本书是对敏捷编程和敏捷原则最全面和最有价值的介绍……绝对是所有NET程式设计师必读之作 。”——Jesse Liberty , 微软资探技术专家 , ProgrammingC#作者要想成为一名优秀的软体开发傊 , 需要熟练套用程式语言和开发工具 , 更重要的是能够领悟代美代码背后的原则和前人总结的经验——这正是本书的主题 。本书凝聚了世界级软体开发大师Robert C Martin数十年软体开发和培训经验 , Java版曾荣获计算机图书最高荣誉——Jolt大奖 , 是广受推的经典着作 , 自出版以来一直畅销不衰 。本书不仅是一部深入浅出、生动易懂的面向对象原则与模式着作 , 而且还是一部通俗的敏捷方法导引书和快速实用UML教程 。通过本书你会发现 , 许多以前看起来非常枯燥费解的概念 , 忽然间都豁然开朗 , 变得鲜活生动起来 。C#版与此前的Java版相比 , 主要的更新包括加强了对UML的介绍章节 , 使其更加贴近实战 , 增加了对MVP模式的介绍等 。注释版在原着基础上增加了丰富的词语注释和背景提示 , 使读者能够轻鬆地领略原汁原味的名着的风采 。作者简介RobertC.Martin(“Bob大叔”)世界级的软体开发大师 , 着名软体谘询公司ObjectMento , 公司的创始人和总裁 。曾经担任C++Report杂誌主编多年 , 也是设计模式和敏捷开发运动的主要倡导者之一 。目录Section I:Agile Development 敏捷开发Chapter 1:Agile Practices 敏捷实践 The Agile Alliance 敏捷联盟Individuals and Interactions over Processes and Tools人和互动重于过程和工具Working Software over Comprehensive Documentation 可以工作的软体重于面面俱到的文档Customer Collaboration over Contract Negotiation 客户合作重于契约谈判Responding to Change over Following a Plan 随时应对变化重于遵循计画Principles 原则Conclusion 结论Bibliography 参考文献Chapter 2:Overview of Extreme Programming 极限编程概述 The Practices of Extreme Programming 极限编程实践Whole Team 完整团队User Stories 用户故事Short Cycles 短交付周期Acceptance Tests 验收测试Pair Programming 结对编程Test.Driven Development(TDD) 测试驱动开发Collective Ownership 集体所有权Continuous Integration 持续集成Sustainable Pace 可持续的开发速度Open Workspace 开放的工作空间The Planning Game 计画游戏Simple Design 简单设计Refactoring 重构Metaphor 隐喻Conclusion 结论Bibliography 参考文献Chapter 3:Planning 计画 Initial Exploration 初始探索Spiking , Splitting , and Velocity 探究、分解和速度Release Planning 发布计画Iteration Planning 叠代计画Defining“Done” 定义“完成”Tlask Planning 任务计画Iterating 叠代Tracking 跟蹤Conclusion 结论Bibliography 参考文献Chapter 4:Testing 测试 TIest-Driven Development 测试驱动开发Example of Test-First Design 测试优先设计的例子Test Isolation 测试促使模组之间隔离Serendipitous Decoupling 意外获得的解耦合Acceptance Tests 验收测试Serendipitous Architecture 意外获得的构架Conclusion 结论Bibliography 参考文献Chapter 5:Refactoring 重构 A Simple Example of Refactoring:Generating Primes 素数产生程式:一个简单的重构示例 Unit Testing 单元测试Refactoring 重构The Final Reread 最后审视Conclusion 结论Bibliography 参考文献Chapter 6:A Programming Episode 一次编程实践 The Bowling Game 保龄球比赛Conclusion 结论Overview of the Rules of Bowling 保龄球规则概述Section II Agile Design 敏捷设计Chapter 7:What Is Agile Design 什幺是敏捷设计 Design Smells 设计臭味Design Smells——The Odors of Rotting Software 设计坏味——腐化软体的气味Rigidity 僵化性Fragility 脆弱性Immobility 顽固性Viscosity 粘滞性Needless Complexity 不必要的複杂性NeedLless Repetition 不必要的重複Opacity 晦涩性Why Software Rots 软体为何会腐化The Copy Program Copy 程式A Familiar Scenario 熟悉的场景Agile Design of the Copy Program copy 程式的敏捷设计Conclusion 结论Bibliography 参考文献Chapter 8:The Single-Responsibility Principle(SRP) SRP:单一职责原则 Defining a Responsibility 定义职责Separating Coupled Responsibilities 分离耦合的职责Persistence 持久化Conclusion 结论Bibliography 参考文献Chapter 9:The Open/Closed Principle(OCP) OCP:开放-封闭原则 Description 0f OCP OCP概述The Shape Application Shape 应用程式Violating OCP 违反OCPConforming to OCP 遵循OCPAnticipation and“Natural”Structure 预测变化和“贴切的”结构Putting the“Hooks”In 放置吊钩Using Abstraction to Gain Explicit Closure使用抽象获得显式封闭Using a Data-Driven Approach to Achieve Closure 使用“数据驱动"的方法获取封闭性 Conclusion结论Bibliography参考文献Chapter 10:The Liskov Substitution Principle(LSP) LSP:Liskov替换原则 Violations 0f LSP 违反LS P的情形A Simple Example 简单例子A More Subtle Violation 更微妙的违反情形A Real-World Example 实际的例子Factoring Instead of Deriving 用提取公共部分的方法代替继承Heuristics and Conventions 启发式规则和习惯用法Conclusion 结论Bibliography 参考文献Chapter 11:The Dependency-Inversion Principle(DIP) DIP:依赖倒置原则 Layering 层次化Ownership Inversion 倒置的接口所有权Dependence on Abstractions 依赖于抽象A Simple DIP Example 简单的DIP示例Finding the Underlying Abstraction 找出潜在的抽象The Furnace Example 熔炉示例Conclusion 结论Bibliography 参考文献Chapter 12:The Interface Segregation Principle(ISP) ISP:接口隔离原则 Interface Pollution 接口污染Separate Clients Mean Separate Interfaces 分离客户就是分离接口Class Interfaces versus Object Interfaces 类接口与对象接口Separation Through Delegation 使用委託分离接口Separation Through Multiple Inheritance 使用多重继承分离接口The ATM User Interface Example ATM用户界面的例子Conclusion 结论Bibliography 参考文献Chapter 13:Overview of UML for C# Programmers C#程式设计师UML概观 Class Diagrams 类图Object Diagrams 对象图Sequence Diagrams 顺序图Collaboration Diagrams 协作图State Diagrams 状态图Conclusion 结论Bibliography 参考文献Chapter 14:Working with Diagrams 使用UMLWhy Model? 为什幺建模Why Build Models of Software? 为什幺构建软体模型Should We Build Comprehensive Designs Before Coding? 编码前应该构建面面俱到的设计吗Making Effective Use of UML 有效使用UMLCommunicating with Others 与他人交流Road Maps 脉络图Back-End Documentation 项目结束文档What to Keep and What to Throw Away 要保留的和要丢弃的Iterative Refinement 叠代式改进Behavior First 行为优先Check the Structure 检查结构Envisioning the Code 想像代码Evolution of Diagrams 图的演化When and How to Draw Diagrams 何时以及如何绘製图示When to Draw Diagrams and When to Stop 何时要画图 , 何时不要画图CASE Tools CASE工具But What About Documentation? 那幺 , 文档呢Conclusion 结论Chapter 15 State Diagrams 状态图 The Basics 基础知识Special Events 特定事件Superstates 超状态Initial and Final Pseudostates 初始伪状态和结束伪状态Using FSM Diagrams 使用FSM图示Conclusion 结论Chapter 16:Object Diagrams 对象图 A Snapshot in Time 即时快照Active Objects 主动对象Conclusion 结论Chapter 17:Use Cases 示例 Writing Use Cases 编写用例Alternate Courses 备选流程What Else? 其他东西呢Diagramming Use Cases 用例图Conclusion 结论Bibliography 参考文献Chapter 18:Sequence Diagrams 顺序图 The Basics 基础知识Obj ects , Lifelines , Messages , and Other Odds and Ends 对象、生命线、讯息及其他Creation and Destruction 创建和析构Simple Loops 简单循环Cases and Scenarios 时机和场合 Advanced Concepts 高级概念Loops and Conditions 循环和条件Messages That Take Time 耗费时间的讯息Asynchronous Messages 异步讯息Multiple Threads 多执行绪Active Objects 主动对象Sending Messages to Interfaces 向接口传送讯息Conclusion 结论Chapter 19:Class Diagrams 类图 The Basics 基础知识Classes 类Association 关联Inheritance 继承An Example Class Diagram 类图示例The Details 细节Class Stereotypes 类衍型Abstract Classes 抽象类Properties 属性Aggregation 聚集Composition 组合Multiplicity 多重性Association Stereotypes 关联衍型Nested Classes 内嵌类Association Classes 关联类Association Qualifiers 关联修饰符Conclusion 结论Bibliography 参考文献Chapter 20 Heuristics and C0ffee 咖啡的启示 The Mark IV Special Coffee Maker Mark IV型专用咖啡机Specification 规格说明书 260A Common but Hideous Solution 常见的丑陋方案Imaginary Abstraction 虚构的抽象An Improved Solution 改进方案Implementing the Abstract Model 实现抽象模型The Benefits of This Design 这个设计的好处Ooverkill 面向对象过度设计Bibliography 参考文献Section Ⅲ The Payroll Case Study 案例Rudimentary Specification of the Payroll System 薪水支付系统的初步规格说明Exercise 练习Use Case 1:Add New Employee 用例1:增加新雇员Use Case 2:Deleting an Employee 用例2:删除雇员Use Case 3:Post a Time Card 用例3:登记考勤卡 Use Case 4:Posting a Sales Receipt 用例4:登记销售凭条Use Case 5:Posting a Union Service Charge 用例5:登记工会服务费Use Case 6:Changing Employee Details 用例6:更改雇员明细Use Case 7:Run the Payroll for Today 用例7:现在运行薪水支付系统Chapter 21:Command and Active Object:Versatility and Multitasking COMMAND模式和ACTlVE OBJECT模式:多功能与多任务 Simple Commands 简单的CommandTransactions 事务Physical and Temporal Decoupling 实体上解耦和时间上解耦Temporal Decoupling 时间上解耦Undo Method Undo()方法Active Object ACTIVE OBJECT模式Conclusion 结论Bibliography 参考文献Chapter 22:Template Method and Strategy:Inheritance versus Delegation TEMPLATE METHOD模式和STRATEGY模式:继承和委託 Template Method TEM PLATE METHOD模式Pattern Abuse 滥用模式Bubble Sort 冒泡排序Strategy STRATEGY模式Conclusion 结论Bibliography 参考文献Chapter 23:Facade and Mediator FACAD E模式和MEDIATOR模式 Facade FACADE模式Mediator MEDIATOR模式Conclusion 结论Bibliography 参考文献Chapter 24:Singleton and Monostate SINGLETON模式和MONOSTATE模式 Singleton SINGLETON模式Benefits SINGLETON模式的好处Costs SINGLETON模式的代价Singleton in Action 运用SINGLETON模式Monostate MONOSTATE模式Benefits MONOSTATE模式的好处Costs MONOSTATE模式的代价Monostate in Action 运用MONOSTATE模式Conclusion 结论Bibliography 参考文献Chapter 25:Null Object NULL OBJECT Description 描述Conclusion 结论 Bibliography 参考文献Chapter 26:The Payroll Case Study:Iteration 1 薪水支付案例研究:第一次叠代开始 Rudimentary Specification 初步的规格说明Analysis by Use Cases 基于用例分析Adding Employees 增加新雇员Deleting Employees 删除雇员Posting Time Cards 登记考勤卡Posting Sales Receipts 登记销售凭条Posting a Union Service Charge 登记工会服务费Changing Employee Details 更改雇员明细Payday 发薪日Reflection:Finding the Underlying Abstractions 反思:找出底层的抽象Employee Payment 雇员支付类别抽象Payment Schedule 支付时间表抽象Payment Methods 支付方式Affiliations 从属关係Conclusion 结论Bibliography 参考文献Chapter 27:The Payroll Case Study:Implementation 薪水支付案例研究:实现 Transactions 事务Adding Employees 增加雇员Deleting Employees 删除雇员Time Cards , Sales Receipts , and Service Charges 考勤卡、销售凭条以及服务费用Changing EmplOyees 更改雇员属性What Was I Smoking? 犯了什幺晕Paying Employees 支付雇员薪水Paying Salaried Employees 支付领月薪的雇员薪水Paying Hourly Employees 支付钟点工薪水Main Program 主程式The Database 资料库Conclusion 结论About This Chapter 关于本章Bibliography 参考文献Section IV:Packaging the Payroll SystemChapter 28:Principles of Package and Component Design 包和组件的设计原则 Packages and Components 包和组件Principles of Component Cohesion:Granularity 组件的内聚性原则:粒度The Reuse/Release Equivalence Principle(REP) 重用-发布等价原则 The Common Reuse Principle(CRP) 共同重用原则The Common Closure Principle(CCP) 共同封闭原则Summary of Component Cohesion 组件内聚性总结Principles of Component Coupling:Stability 组件的耦合陛原则:稳定性The Acyclic Dependencies Principle(ADP) 无环依赖原则The Stable-Dependencies Principle(SDP) 稳定依赖原则The Stable-Abstractions Principle(SAP) 稳定抽象原则Conclusion 结论Chapter 29:Factory FACTORY模式A Dependency Problem 依赖问题Static versus Dynamic Typing 静态类型与动态类型SubStitutable Factories 可替换的工厂Using Factories for TIest Fixtures 对测试支架使用对象工厂Importance of Factories 工厂的重要性Conclusion 结论Bibliography 参考文献Chapter 30:The Payroll Case Study:Package Analysis 薪水支付案例研究:包分析Component Structure and Notation 组件结构和符号Applying the Common Closure Principle(CCP) 套用CCPApplying the Reuse/Release Equivalence Principle(REP) 套用REPCoupling and Encapsulation 耦合和封装Metrics 度量Applying the Metrics to the Payroll Application 度量薪水支付应用程式Object Factories 对象工厂Rethinking the Cohesion Boundaries 重新思考内聚的边界The Final Packaging Structure 最终的包结构Conclusion 结论Bibliography 参考文献Chapter 31:CompositeCOMPOSITE模式Composite Commands 组合命令Multiplicity or No Multiplicity 多重性还是非多重性Conclusion 结论Chapter 32:Observer:Evolving into a Pattern OBSERVER——演化至模式The Digital Clock 数字时钟The Observer Pattern OBSERVER模式Models 模型Management of OOD Principles 面向对象设计原则的运用Conclusion 结论Bibliography 参考文献Chapter 33:Abstract Server,Adapter,and Bridge ABSTRACTSERVER模式、ADAPTER模式和BRIDGE模式 Abstract Server ABSTRACT SERVER模式Adapter ADAPTER模式The Class Form of Adapter 类形式ADAPTER模式The Mode,m Problem , Adapters , and LSP 数据机问题、适配器以及LSPBridge BRIDGE模式Conclusion 结论Bibliography 参考文献Chapter 34:Proxy and Gateway:Managing Third-Party APIs PROXY模式和GATEWAY模式:管理第三方APIProxy PROXY 模式Implementing Proxy 实现PROXY模式Summary 小结Databases , Middleware , and Other Third.Party Interfaces 资料库、中间件以及其他第三方接口Table Data Gateway TABLE DATA GATEWAYTesting and In.Memory TDGs 测试和记忆体TDGTesting the DB Gateways 测试DbGateWayUsing Other Patterns with Databases 可以用于资料库的其他模式Conclusion 结论Bibliography 参考文献Chapter 35:Visitor VISITOR模式VISITOR VISITOR模式Acyclic Visitor ACYCLIC VISITOR模式Uses of VISITOR 使用VISITOR模式Decorator DECORATOR模式Extension Object EXTENSION OBJECT模式Conclusion 结论Bibliography 参考文献Chapter 36:State STATE模式Nested Switch/Case Statements 嵌套switch/case语句The Internal Scope State Variable 内部作用域的状态变数Testing the Actions 测试动作Costs and Benefits 代价和收益Transition Tables 迁移表Using Table Interpretation 使用表解释 Costs and Benefits 代价和收益The State Pattern STATE模式State versus Strategy STATE模式和STRATEGY模式Costs and Benefits 代价和收益The State Machine Compiler(SMC) 状态机编译器Turnstile.CS Generated by SMC , and Other Support Files SMC生成的Turnstile.CS以及其他支持档案 593Costs and Benefits 代价和收益Classes of State Machine Application 状态机套用的场合High-Level Application Policies for GUIs 作为GUI中的高层套用策略GUI Interaction Controllers GUI互动控制器Distributed Processing 分散式处理Conclusion 结论Bibliography 参考文献Chapter 37:The Payroll Case Study:The Database 薪水支付案例研究:资料库Building the Database 构建资料库A Flaw in the Code Design 一个代码设计缺陷Adding an Employee 增加雇员Transactions 事务Loading an Employee 载入Employee对象What Remains? 还有什幺工作Chapter 38:The Payroll User Interface:Model View Presenter 薪水支付系统用户界面:Model-View-Presenter The Interface 界面Implementation 实现Building a Window 构建视窗The Payroll Window Payroll 视窗The Unveiling 真面目Conclusion 结论Bibliography 参考文献Appendix A:A Satire of Two Companies 双公司记 Rufus Inc.:Proj ect Kickoff Rufus公司:“日落”项目 671 Rupert Industries:Project Alpha Rupert工业公司:“朝晖”项目Appendix B:What Is Software? 什幺是软体Index索引