Supposed there is an application with multiple windows, like:
Logo splashscreen
Connecting… screen
Login-usercontrols screen
Logging in… screen
etc.
Is there a design pattern, which allows to effectively manage all those windows? (to hide previous windows, display a new window etc.)
7
Mediator promotes loose coupling by keeping objects from referring to each other explicitly, and it lets you vary their interaction independently.
As an example, consider the implementation of a dialog box to present a collection of widgets such as buttons, menus, and entry fields. There may be dependencies between the widgets in the dialog, e.g., selecting an entry in a list box might change the contents of an entry field.
Such dependencies can be reduced by encapsulating collective behavior in a mediator object. A mediator is responsible for controlling and coordinating the interactions of these objects. The mediator acts as an intermediary and keeps objects in the group from referring to each other explicitly. The objects only know the mediator, thus reducing the number of interconnections.