MVVM - Services Migration to Libraries.

Vignesh Govindhan 26 Reputation points
2020-06-15T06:54:39.807+00:00

We have three Projects in a solution name Data, ViewModel, App. We have a set of application services whose Interfaces are in ViewModel and classes are in App.

Example:

I have an ILogService interface in ViewModel and LogService in App. We will use ServiceLocator to bind them. We are planning to move these
services into the Library.

The questions are

  1. Do we really need both Interface and Class? or is classes are just enough?
  2. if we need both interface and class,
    a) Do we need to add them in the same library and import them to App and ViewModel?
    b) Do we need to add them to separate libraries and import Classes to App and Interfaces to ViewModel?
  3. Which is the correct way of doing it without breaking the MVVM architecture?
Developer technologies | Universal Windows Platform (UWP)

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.