Structural Design Patterns

Pipes and Filters


Decompose a task into smaller tasks that chain from one to another using a data stream.


Pipes and filters allow classes to narrow their responsibility to just a small segment of the problem and pass what is left onto the next class. This chain of objects can be very modular such that they can be plugged in anywhere in the stream dynamically as needed.


Use the output of one class to make the input of another in a chain.


Autobot Robotics has some vision processing software. In this software, an image goes through several layers of preprocessing before it is handed to the final decoder.


This could be considered an enterprise, architectural, or a structural design pattern depending on the scale of the project.