Mediator Pattern

We mentioned Mediator Pattern when we look at Front-end Controller Pattern from the MVC. The Front-end Controller is a web application pattern which "provides a centralized entry point for handling requests".

Mediator Pattern Definition
"The mediator pattern defines an object that encapsulates how a set of objects interact. This pattern is considered to be a behavioral pattern due to the way it can alter the program's running behavior."

Analog To Real world
An airport control tower is an excellent example of the mediator pattern. The tower looks after who can take off and land - all communications are done from the airplane to control tower, rather than having plane-to-plane communication.

Implementation in Java API

Resources:
http://en.wikipedia.org/wiki/Mediator_pattern
http://java.dzone.com/articles/design-patterns-mediator

评论

此博客中的热门博文

AVR Tutorial - Input / Output

AVR ADC Analog to Digital Converter

Introduction to REST