This question might sound so basic to MVVM experts but I'm trying to understand how should I know when I need to create ViewModel and how many ... OK I have learned that ViewModel is the glue between View (UI) and Model (Data) but sometimes I see an applications has 2 UIs only and one Model but then there are 5 ViewModels involved in it.
In fact, all I need to understand is what phenomenon in a project should be represented by a ViewModel?
Let's say we have a phone book app. So I'm assuming Contacts need a UI e.g. search. display, edit and delete do tell me how many UIs I need. Also,
{
string firstName,
string lastName,
string phone,
bool isCompany
}
can be a structure for the Model.
Now, when it gets to ViewModel how many ViewModels are we dealing with? and how do you recognize them?
I hope this is clear.