Print Page | Close Window

Interfaces on ViewModels

Printed From: IdeaBlade
Category: Cocktail
Forum Name: Community Forum
Forum Discription: A professional application framework using Caliburn.Micro and DevForce
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=3340
Printed Date: 27-Apr-2025 at 10:47pm


Topic: Interfaces on ViewModels
Posted By: JohnBloom
Subject: Interfaces on ViewModels
Date Posted: 15-Mar-2012 at 7:11am
I remember an example project that I checked out back when Cocktail was the DAF that used interfaces to import ViewModels. In the TempHire application it seems that you guys have moved away from that.
Do you have any recomendation one way or the other?

-------------
-John Bloom



Replies:
Posted By: mgood
Date Posted: 15-Mar-2012 at 11:11am
Interfaces make sense if you expect to have different implementations. For ViewModels that's generally unlikely. ViewModels typically don't need to be fake for testing for example. Repositories etc. on the other hand will often be fake during testing and therefore should be imported via interfaces.



Print Page | Close Window