Summary
In this chapter, we saw how to examine two libraries that are responsible for parsing two different file formats. We used what we learned to inform the design of the interface that homogenizes the use of them that we will use in the main executable of the project. This pattern allows us to encapsulate the specific details of how each file format is handled and hide these details from the top level. This will make changing details internally easier and also allow for more sensible unit testing. We also discussed our strategy of choosing a reader for each file type by examining the extension of the paths provided via the command-line interface that we constructed in Chapter 8.
The addition of these two file readers means that we can now process two of the three file formats that are required by the client for this challenge. We still have to learn how to process the raw text-based responses and implement an additional file reader interface to handle this particular case...