Even though the design pattern movement is aligned with OOP, and reactive programming is aligned towards FP, there are close similarities between them. In a previous chapter(Chapter 5, Introduction to Observables), we learned the following:
- The OOP model is good for modeling the structural aspects of a system.
- The FP model is good for modeling the behavioral aspects of a system.
To illustrate the connection between OOP and reactive programming, we will write a program that will traverse directories to enumerate files and sub-folders within a given folder.
We will create a composite structure that contains the following:
- A FileNode (inherits from the abstract class EntryNode) that models file ...