Secretary pattern: decreasing coupling while keeping reusability

Proceedings of the 11th Latin-American Conference on Pattern Languages of Programming(2016)

Cited 22|Views4
No score
Abstract
Clients that depend on a class with multiple behaviors are unnecessarily tied to the behaviors they do not use. One possible solution is to split the class in many, but this is not a good strategy if different behaviors share common code. This paper introduces the Secretary pattern, which decreases the client's coupling while keeping maximum reusability. In this pattern, auxiliary classes - called Secretaries - represent behaviors and interact with clients while the main class - called Boss - holds the reusable implementation code. The Secretary pattern has been originally identified in the refactoring of the ToPS framework and is also used to implement trait objects and interface objects in the Rust and Go compilers.
More
Translated text
AI Read Science
Must-Reading Tree
Example
Generate MRT to find the research sequence of this paper
Chat Paper
Summary is being generated by the instructions you defined