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
Do we really need both Interface and Class? or is classes are just enough?
if we need both interface and class,
a) Do we need to add them in the same library and import them toApp
andViewModel
?
b) Do we need to add them to separate libraries and importClasses
toApp
andInterfaces
toViewModel
?Which is the correct way of doing it without breaking the MVVM architecture?