The essence of the program. 1. Connection to the server, getting a list of current versions of some products 2. Comparison of the received data with those stored in the database 3. Displaying differences
Product class - contains the product id and its name. ProductContent class (list) - product id that owns, disc - content description, href - download link. Versions class (list) - product id that owns, VersionType - version type, Ver - version number .
The layer for working with the database at the moment takes all these classes separately and writes them into the necessary tables. It seems everything looks pretty decent, but the question arose for the convenience of work, these classes need to be combined in some way, the first thing that came to mind would be that the Product class would contain instances of ProductContent and Versions, since this would be convenient for comparing the differences between data from the server and the database data, but then it would be necessary to rewrite the database operation component. The next option was in the component where the data is retrieved from the server and the subsequent verification with the stored data, enter the class, for example, FullProduct and in it already implement ProductContent and Versions + in the same component to register its receipt / saving from the database. Maybe someone came across something similar?