Introduction to Design Patterns

Design patterns are efficient and elegant solutions to common problems in object-oriented software design. They are high-level abstract templates that can be applied to particular kinds of design problems.


Iteration and the Visitor Pattern


In their very influential book, Design Patterns, Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides, often (affectionately) referred to as the "Gang of Four," analyzed 23 specific patterns [Gamma95]. Each pattern has a section devoted to it, including

  • A pattern name
  • A description of the kinds of problems to which one might apply the pattern
  • An abstract description of a design problem and how its solution can be obtained
  • A discussion of the results and trade-offs that can occur when the pattern is applied

Design patterns are used for many different purposes. As a result, they are subdivided into categories. The three main categories are

  • Creational patterns, which manage the creation of objects
  • Structural patterns, which describe how objects are connected together to form more complex objects
  • Behavioral patterns, which are used to describe how code is organized, to assign responsibility or roles to certain classes, and to specify the way objects communicate with each other

The Gang of Four assert that design patterns are "descriptions of communicating objects and classes that are customized to solve a general design problem in a particular context." As we continue to develop applications with Qt, we will discuss and give examples of several design patterns.

Iteration and the Visitor Pattern

Part I: Introduction to C++ and Qt 4

C++ Introduction


Introduction to Qt



Inheritance and Polymorphism

Part II: Higher-Level Programming


Introduction to Design Patterns


Generics and Containers

Qt GUI Widgets


Validation and Regular Expressions

Parsing XML

Meta Objects, Properties, and Reflective Programming

More Design Patterns

Models and Views

Qt SQL Classes

Part III: C++ Language Reference

Types and Expressions

Scope and Storage Class

Statements and Control Structures

Memory Access

Chapter Summary

Inheritance in Detail

Miscellaneous Topics

Part IV: Programming Assignments

MP3 Jukebox Assignments

Part V: Appendices

MP3 Jukebox Assignments


MP3 Jukebox Assignments

An Introduction to Design Patterns in C++ with Qt 4
An Introduction to Design Patterns in C++ with Qt 4
ISBN: 0131879057
EAN: 2147483647
Year: 2004
Pages: 268 © 2008-2020.
If you may any questions please contact us: