dimanche 13 novembre 2016

.NET Design Pattern MVVM with ViewModelService

While researching on the MVVM pattern, I often come across a "services" component in this pattern specially with the new .net core documents, webcasts & learning materials.

Samples have:

  • Index.cshtml (View)
  • HomeController (Controller)
  • ViewModelService (?)
  • IndexViewModel (ViewModel)
  • IndexModel (Model)

Is the usage of an additional abstraction layer (ViewModelService) an extension of the MVVM Pattern and good practice or is there another name for this pattern? Code looks good and clean for me, but most explanation of the MVVM pattern don't use a ViewModelService for creating the ViewModel and passing it to the controller.

thanks.

Aucun commentaire:

Enregistrer un commentaire