Skip to content

Model Pollution

mnbeer edited this page Jun 6, 2020 · 1 revision

What is Model Pollution?

Model pollution refers to the proliferation of secondary classes, typically dumb POCO classes, that formally or informally derive from other classes.

In large applications (especially Web and API applications), elements of one class may end up in any number of other classes. For example, a Person class may be related to a host of other classes with names like PersonViewModel, PersonEditModel, PersonCreationModel, PersonListModel, PersonSearchModel, PersonWithPrimaryAddressModel, etc. These models are helpful, as they help define contracts with consumers. But the sheer number of them in a large application can make management and maintenance difficult. Tangls provide cross-class structures to keep things in sync.

Clone this wiki locally