I l@ve RuBoard Previous Section Next Section

Chapter 9. Abstract Factory

This chapter discusses a generic implementation of the Abstract Factory design pattern (Gamma et al. 1995). An abstract factory is an interface for creating a family of related or dependent polymorphic objects.

Abstract factories can be an important architectural component because they ensure that the right concrete objects are created throughout a system. You don't want a FunkyButton to appear on a ConventionalDialog; you can use the Abstract Factory design pattern to ensure that a FunkyButton can appear only on a FunkyDialog. You do this by controlling a small piece of code; the rest of the application works with the abstract types Dialog and Button.

After reading this chapter, you will

  • Understand the area of applicability of the Abstract Factory design pattern

  • Know how to define and implement Abstract Factory components

  • Know how to use the generic Abstract Factory facility provided by Loki and how to extend it to suit your needs

    I l@ve RuBoard Previous Section Next Section