views:

38

answers:

1

I am hoping there is a better way to do this. Do I really have to wrap each method of my wcf service into an interface in order to use it?

I don't think my fellow developers are going to buy into this because of the amount of time it takes... there must be a better way!

+1  A: 

Wrapping each method of a service into an interface isn't only testable design, but in general a good design. If you want to replace your wcf services with say rest service, consumers of the service don't have to do anything as they are using the interface. Using, an interface will allow you to do mocking and all that, which is good. But, here the most important thing is correct design.

P.K
How much time does it *really* take to create these interfaces? The "it takes too much time to make the interfaces" argument really doesn't hold much water if you really analyze it. Especially when a good unit test suite will lower your iteration time to seconds.
kyoryu
@kyoryu can't agree with you more when you say "..a good unit test suite will lower your iteration time to seconds"
P.K