14.2 Combining many applications using the Command design pattern
Many complex suites of applications follow a design pattern similar to the one used by the Git program. There’s a base command, git, with a number of subcommands. These include git pull, git commit, and git push.
What’s central to this design is the idea of a collection of individual commands under a common parent command. Each of the various features of Git can be thought of as a separate subclass definition that performs a given function.
14.2.1 Getting ready
We’ll build a composite application from two commands. This is based on the Combining two applications into one recipe from earlier in this chapter.
These features are based on modules with names such as markov_gen, markov_summ, and markov_analysis. The idea is that we can restructure separate modules into a single class hierarchy following the Command design pattern.
...