<aside> <img src="/icons/map-pin_gray.svg" alt="/icons/map-pin_gray.svg" width="40px" /> Software architecture pattern and software architecture style may be used interchangeably. Just know that they refer to same concept.
</aside>
As we covered in Week 5, in a layered architecture, each layer waits for a response from the other layer before proceeding. When we have classes that do not belong to a specific layer, a side bar may be useful to implement.
Figure 6.1 Side bar in layered architecture.
As the name suggests, it is connected to the side of each layer, so it can be accessed by any layer. In an LMS we can have a bookUserInfo
class used for passing information between layers.
Some application have a specific format, where they can be divided into different processor units.
Figure 6.2 Pipe and filter architecture.
The idea is that data is passed through a series of processing steps:
A notable example is the UNIX shell, which you all should be familiar with as we have designed one in COE628.
Figure 6.3 UNIX shell diagram.
You can think of it as queue. It is arranged in a way that the output of each element is the input of the next.
ls
is our input, which will output a list of files.|
is called a pipe symbol — a fitting name to use in our example. It pipes the list that was the output of our first command, as the input for our second command.grep "CS3219"
filters whose names contain CS3219
and outputs this new list of files.grep "Lecture"
further filters the new list to output the files whose names contain Lecture
.