C++ design patterns

Example isn't another way to teach, it is the only way to teach. Albert Einstein.

Nontrivial systems include many recurring design problems whose solutions are commonly repeated from place to place, and from programmer to programmer. The essence and basic structure of a solution may be repeated many times, even though the realization is different in each case. Patterns offer a technique for capturing design and architecture, presenting and communicating architectural knowledge at all levels of a system, allowing experience to be understood and distilled. Patterns allow developers to work on and understand designs, and are not a basis for automation of design. Frameworks and libraries present code-level reuse often built on common patterns. This course introduces patterns from the ground up, presenting principles as well as concrete examples in UML and C++. It develops understanding through lectures, discussion, and some exercises to reinforce the concepts by putting them into practice.

Duration: 2 days

objectives

  • solve common C++ programming design problems without recreating the wheel
  • tap into a wealth of collected knowledge on software development
  • use patterns at every stage of software development: architecture, design, and implementation
  • understand what does and does not go to make up a pattern
  • understand the beneficial role of patterns in all aspects of development
  • learn and use common patterns for object-oriented and large-scale design
  • appreciate patterns from the strategic level down to idiomatic examples in C++
  • learn C++ by appreciating how to use patterns in your C++ programming

target audience

The course is suitable for software developers and designers familiar with C++.

prerequisites

Ideally this training would be preceded by the course: design and develop C++ applications.

Design and architecture

  • what is software architecture?
  • describing or defining an architecture
  • reuse of knowledge
  • patterns in software design

Pattern structure

  • basic form
  • problem and forces
  • solution and consequences
  • an example - the Composite pattern
  • documenting patterns
  • documenting pattern use

Organizing patterns

  • pattern catalogues
  • the "Gang of Four"
  • "Pattern-Oriented Software Architecture" (POSA)
  • strategic versus tactical patterns
  • review of organizational patterns
  • review of analysis patterns
  • review of architectural patterns
  • review of design patterns and idioms
  • pattern languages

Delegation patterns

  • basic principles
  • Adapter and its variations
  • Proxy
  • Bridge
  • Manager

Decoupling patterns

  • layers
  • Interface Decoupling
  • Role Decoupling
  • Observer
  • The Law of Demeter

Creational patterns

  • Factory Method
  • Disposal Method
  • Singleton (and issues)
  • Cloning
  • Copy Constructor

Value patterns

  • value-based programming
  • Whole Value
  • Value Object
  • Enumeration Values
  • Class Factory Method
  • Copied Value
  • Immutable Value
  • Mutable Companion

Functional patterns

  • Named Selector
  • Command
  • Command Processor
  • Command Adapter
  • Composite Command
  • Composite Exception
  • Block
  • Active Object

Sequential patterns

  • Combined Method
  • Finally for Each Release
  • Execute-around Method

Iteration patterns

  • Iterator
  • Combined Iterator
  • Enumeration Method

Selection patterns

  • Null Object
  • State-based Selection
  • Objects for States (State)
  • Collections for State

Please note, when taught at your site, this course is customizable. Modules can be adapted, removed, added from other courses, or even created.

timetable

Day 1

  • Design and architecture
  • Pattern structure
  • Organizing patterns
  • Delegation patterns
  • Decoupling patterns

Day 2

  • Creational patterns
  • Value patterns
  • Functional patterns
  • Sequential patterns
  • Iteration patterns
  • Selection patterns

course instructor

The course is presented by one of our senior consultants, each of whom has at least ten years' experience in software development, and at least three years' experience as a trainer and consultant in a diverse range of application areas.

print     printer-friendly version