In order to deal with the problem of incompatible interfaces, Mediator Pattern allows convert the one incompatible into another that the client expects:
The following summary shows us how CKJM Metrics have been affected in this project after having applied the Mediator Pattern:
CKJM Metric | Without the Pattern | With the Pattern |
---|---|---|
WMC: Weighted methods per class | ||
DIT: Depth of Inheritance Tree | ||
NOC: Number of Children | ||
CBO: Coupling between object classes | ||
RFC: Response for a Class | ||
LCOM: Lack of cohesion in methods | ||
Ca: Afferent coupling (not a C&K metric) | ||
NPM: Number of Public Methods for a class (not a C&K metric) |