The first step in designing a maintainable project is to properly split it in clearly defined modules. A common approach is to separate the engine from the user interface. This separation forces you to reduce coupling between the different parts of your code and make it more modular.
This is exactly the approach we will take with the gallery application. The project will be divided into three sub-projects:
The sub-projects are as follows:
- gallery-core: This is a library containing the core of the application logic: the data classes (or business classes), persistent storage (in SQL), and the model that makes the storage available to the UI through a single entry point.
- gallery-desktop: This is a Qt widget application that will depend on the gallery-core library to retrieve data and display it to the user. This project will be covered in Chapter...