I read online that using a "model for the kitchen" is a bad practice:
Rule number 3 - View dictates the viewModel design. Just what is required to render a view using the ViewModel.
If the Customer object has fifty properties, but only one component shows its name, then we create our own ViewModel type with only these two properties.
However, Jimmy Bogard subsequently explained how good it is, but I asked a little. It would be so simple that my model simply contains a list of clients, I could even use my POCO.
So, now I can create custom small fragments of the view model for each page of the site? Each page using the Customer property will receive one, but, of course, cannot be used, because some information is extraneous if, for example, one page used Age, but not Name. Two new classes of mini-models?
This is a very time-consuming task, and it looks like it will lead to the creation of a million small models of user views - can someone clarify how useful this approach is and why is the simpler approach bad?
source share