I’m new at programming, but I am doing my best to learn!
I have an application where i have to inject an IView into my ViewModel. This means the IView interface should be located in the ViewModel assembly, and not in the View one, or i’d break MVVM rules adding a reference from VM to View assembly.
So my question is: is it absurd to divide interface and implementing classes in two different assemblies, or is this the right way to proceed?
Thank you all very much!
No, it is quite common. It already happens when your classes implement INotifyPropertyChanged for instance.
In WCF it is a (recommended) practice to put the Service interfaces in a separate assembly (ie in an assembly that contains only interfaces).