Where do interfaces belong in a multitier application
- by Russell Steen
So say you have a three tier application with the tiers UI, Services, and Repository for a simple application, let's say saving addresses.
If AddressService has an interface IAddressService, where does that interface belong? I know that "in the address service" may seem like an obvious answer, but if it's in the address service it would seem to defeat the point of having the interface such that any service library could be swapped in as long as it implemented IAddressService.
(specifically this is in a .net problem space, but it's probably more general so it's tagged architecture)