I have basic viewmodel on server-side, let it be on C# language and ASP.NET Core server-side, for example:
public class BookViewModel
{
public string Id { get; set; }
public string Name { get; set; }
//other properties removed for brevity
}
Then, I send it to client page.
On client-side, I have rich UI with some Javascript MVVM framework.
These frameworks manipulates with viewmodels as I understand. So, the trouble, is that I don't understand what we really must do with viewmodels on client-side?
I mean, If I want send my viewmodel from client to server via Ajax, I need explicitly define all properties of that viewmodel. So, I need explicitly define all my server-side viewmodels, as Javascript objects in special file, whatever. How can I avoid such routine work?