wurmf / OpenBooth

An open source linux application for a photo booth.
MIT License
8 stars 0 forks source link

Restructure all entities, daos and service classes to use only flat dtos #48

Closed wurmf closed 6 years ago

wurmf commented 6 years ago

Deep dtos/entities make the structure of a program very complicated and confusing. A better solution would be to use only flat objects, which store the attributes of the entity (e.g. a profile only has a id, a name, printEnabled, filterEnabled, greenscreenEnabled and a watermark but no list of background categories). The related entities can then be accessed through service methods such as getBackgroundCategoriesForProfile, which themselves call a seperate dao, which is only responsible for storing the relation.