Building Modular and Extensible CLI Applications
Throughout the pages of this book, we have added more and more functionalities to Bookmarkr, our beloved CLI application.
The problem is that we have also added more and more lines of code to the Program.cs
file. The length of this file has grown from 191 lines of code by the end of Chapter 3 to 479 lines of code by the end of Chapter 7.
In this chapter, we will take a step back and refactor our code to make it more modular. This will make it easier to extend, test, and maintain.
Refactoring is an essential part of the development life cycle. It should happen periodically in order to ensure that the quality of code is up to the standards.
By taking this necessary step, we will greatly simplify adding more features, enhance the readability and stability of our application, and even introduce testability into it.
More specifically, in this chapter, we’ll cover the following topics:
- Building the code map of...