Klaus Iglberger
——Mark Summerfield

C++培训师兼顾问Klaus Iglberger解释了如何管理依赖性和抽象,提高软件实体的可变性和可扩展性,以及应用和实现现代设计模式来帮助你利用现今的一切可能性。软件设计是软件项目最重要的一环,因为它影响到软件最重要的属性:可维护性、可变性和可扩展性。
● 学习如何根据软件设计评估你的代码
● 理解什么是软件设计,包括可变性和可扩展性等设计目标
● 探索每种设计方法的优缺点
● 学习如何使用设计模式解决问题和表达意图
● 选择正确形式的设计模式,以充分发挥其优势
  1. Preface
  2. 1. The Art of Software Design
  3. Guideline 1: Understand the Importance of Software Design
  4. Guideline 2: Design for Change
  5. Guideline 3: Separate Interfaces to Avoid Artificial Coupling
  6. Guideline 4: Design for Testability
  7. Guideline 5: Design for Extension
  8. 2. The Art of Building Abstractions
  9. Guideline 6: Adhere to the Expected Behavior of Abstractions
  10. Guideline 7: Understand the Similarities Between Base Classes and Concepts
  11. Guideline 8: Understand the Semantic Requirements of Overload Sets
  12. Guideline 9: Pay Attention to the Ownership of Abstractions
  13. Guideline 10: Consider Creating an Architectural Document
  14. 3. The Purpose of Design Patterns
  15. Guideline 11: Understand the Purpose of Design Patterns
  16. Guideline 12: Beware of Design Pattern Misconceptions
  17. Guideline 13: Design Patterns Are Everywhere
  18. Guideline 14: Use a Design Pattern’s Name to Communicate Intent
  19. 4. The Visitor Design Pattern
  20. Guideline 15: Design for the Addition of Types or Operations
  21. Guideline 16: Use Visitor to Extend Operations
  22. Guideline 17: Consider std::variant for Implementing Visitor
  23. Guideline 18: Beware the Performance of Acyclic Visitor
  24. 5. The Strategy and Command Design Patterns
  25. Guideline 19: Use Strategy to Isolate How Things Are Done
  26. Guideline 20: Favor Composition over Inheritance
  27. Guideline 21: Use Command to Isolate What Things Are Done
  28. Guideline 22: Prefer Value Semantics over Reference Semantics
  29. Guideline 23: Prefer a Value-Based Implementation of Strategy and Command
  30. 6. The Adapter, Observer, and CRTP Design Patterns
  31. Guideline 24: Use Adapters to Standardize Interfaces
  32. Guideline 25: Apply Observers as an Abstract Notification Mechanism
  33. Guideline 26: Use CRTP to Introduce Static Type Categories
  34. Guideline 27: Use CRTP for Static Mixin Classes
  35. 7. The Bridge, Prototype, and External Polymorphism Design Patterns
  36. Guideline 28: Build Bridges to Remove Physical Dependencies
  37. Guideline 29: Be Aware of Bridge Performance Gains and Losses
  38. Guideline 30: Apply Prototype for Abstract Copy Operations
  39. Guideline 31: Use External Polymorphism for Nonintrusive Runtime Polymorphism
  40. 8. The Type Erasure Design Pattern
  41. Guideline 32: Consider Replacing Inheritance Hierarchies with Type Erasure
  42. Guideline 33: Be Aware of the Optimization Potential of Type Erasure
  43. Guideline 34: Be Aware of the Setup Costs of Owning Type Erasure Wrappers
  44. 9. The Decorator Design Pattern
  45. Guideline 35: Use Decorators to Add Customization Hierarchically
  46. Guideline 36: Understand the Trade-off Between Runtime and Compile Time Abstraction
  47. 10. The Singleton Pattern
  48. Guideline 37: Treat Singleton as an Implementation Pattern, Not a Design Pattern
  49. Guideline 38: Design Singletons for Change and Testability
  50. 11. The Last Guideline
  51. Guideline 39: Continue to Learn About Design Patterns
  52. Index
作者:Klaus Iglberger
原版书书名:C++ Software Design
原版书出版商:O'Reilly Media
Klaus Iglberger
Klaus Iglberger是一名自由职业的C++培训师和顾问。他在世界各地开办的热门培训课程中分享了个人15年的C++专业知识,并经常在C++会议上发言。自2010年获得博士学位以来,Klaus一直专注于大型软件设计和提高软件的可维护性。
The animal on the cover of C++ Software Development is is the common crane (Grus grus, or “crane crane”). Also known as the Eurasian crane, the common crane is most often found throughout the Paleartic region, which spans northern Europe, northern Asia, and North Africa, though isolated groups have been seen as far east as Ireland and as far west as Japan. The largest nesting populations of common cranes can be found each year in Russia and Scandinavia.
A large, stately bird, the common crane is of medium size among crane species, with a body length of 39–51 inches and a wingspan of 71–94 inches, and weighing 10–12 pounds on average. It has a slate-gray body with a black face, a black-and-white neck, and a red crown. Every two years or so, this migratory bird molts its feathers entirely, remaining flightless for six weeks while new feathers grow in. During migration, flocks of four hundred individuals or more may travel together. These flocks have been observed flying at altitudes of up to 33,000 feet, the second highest of any bird species.
Like all cranes, the common crane is omnivorous, eating plant matter as well as insects, amphibians, rodents, and other small animals. The cranes typically forage in small groups on land or standing in shallow water, probing with their bills for food.
Cranes have featured in human art and iconography since ancient times, appearing in Aesop’s Fables, inspiring traditional dances such as one performed in Korea since 646 CE, and having association with gods in ancient South Arabia and Greece, to share just a few examples. Several styles of martial art, particularly kung fu, have taken inspiration from the graceful movements of the crane, as popularized in the 1984 hit film The Karate Kid.
With a global population of around six hundred thousand as of 2014, the common crane has been classified by the IUCN as being of least concern, making it one of only four species of crane not considered threatened or dependent on conservation.