At this point, your refactoring of TodoIt should be fully functional. Go ahead and give it a try.
Also, take some time to observe the console output and explore the objects.
If we look at the application from a functional point of view, we haven't changed anything. But we have actually drastically improved the code quality, even if it has doubled the number of lines of code:
- We now have a solid domain model that uses encapsulation.
- We have applied the SRP to isolate responsibilities and avoid mixing concerns.
- We have applied the MVC design pattern to isolate parts of our code, which has helped us respect the LoD.
- We have applied composition (for example, coding the controller against the view interface).
With this structure in place, it actually becomes very easy to modify or extend our application. For instance, if you later decide to add new...