Where do interfaces belong in a multitier application

Posted by Russell Steen on Stack Overflow See other posts from Stack Overflow or by Russell Steen
Published on 2010-02-22T20:22:20Z Indexed on 2010/03/21 16:11 UTC
Read the original article Hit count: 353

Filed under:

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)

© Stack Overflow or respective owner

Related posts about architecture