Unit Testable WCF Web Services in MVVM and Silverlight 4

added by spavkov
4/15/2010 8:15:07 AM

9 Kicks, 357 Views

I figured that there has to be a better way to solve this everyday problem so while working on my personal MVVM framework (yes, everyone is building one these days) i was setting these goals regarding the Web Service calls from my MVVM applications: 1. simplify as much as possible asynchronous invocation of Web Service methods (avoid writing boring boilerplate code for each call) 2. get rid of the Add Service Reference approach completely if possible 3. make the Web Services unit testable (hide them behind some interface so we can mock them in our unit tests) 4. simplify exception handling 5. fault tolerance (if web service client is faulted by exception it should be automatically recreated) ...