So far, all our applications held data in memory as local variables or attributes. However, we also want to be able to persist information so that it is not lost when the program is closed.
In this chapter, we will discuss how to represent and display this data using object-oriented programming (OOP) principles and applying the Model-View-Controller (MVC) pattern. In short, this pattern proposes three components into which we can divide our GUI: a model that holds the application data, a view that displays this data, and a controller that handles user events and connects the view with the model.
These concepts are related to how we manipulate and persist information, and in turn help us to improve the organization of our programs. Most of these recipes are not specific to Tkinter, and you can apply the same principles to other GUI libraries.