Summary
We have covered two quite separate topics in this chapter and covered both theoretical and practical subject matter. The composite pattern is incredibly useful and we saw how it could easily be used in the stead of other patterns, such as the builder.
Patterns are of no use if we do not have a handle on the more mechanical processes our software has to perform, such as file storage, and it should be clear that the list-like nature of data files, such as the shared preferences we worked with earlier, would be well-suited to builder patterns, and more complex data structures could be handled with composites.
In the next chapter, we will look at more non-immediate structures as we explore how to create services and post notifications to users when our application is not currently active. This will introduce observer patterns, which you will no doubt have encountered, in the form of listener methods.