Design Patterns / Week 8

Multiple UI frameworksSupporting Multiple Window Frameworks

In a previous post we started the design of a cross-platform GUI framework supporting multiple LNF. A family of LNF-specific classes were introduced in the design. We shall see in this lecture how to connect these classes to platform-specific libraries. Concretely, the Bridge pattern will help us to interconnect the two parallel hierarchies. Bridge emphasis the decoupling at design time of abstraction and their, possible multiple, implementations.

A similar pattern, which also adapts some classes (implementations) to other classes (abstractions) is Adapter pattern that comes in two flavors: both class and object structural, depending on what adaptation mechanism it is used (multiple inheritance vs. object composition). What differentiates the two patterns, Bridge and Adapter, is the phase when they are used: Bridge is essentially a design tool, while Adapter enters the scene in implementation phase of the project.

More details about supporting multiple UI frameworks are available in this week’s lecture handouts.

This entry was posted in Design Patterns and tagged , , . Bookmark the permalink.