In designing component package / framework using Interface programming, where is the best place to put the Interfaces to reduce dependencies? In a single assembly that is referenced by other assemblies. In the domain assembly near the class that inherits the interface? or In the client assembly where the interface is being used?

Showing Answers 1 - 5 of 5 Answers

Abhang

  • Jun 7th, 2006
 

I think the best place is to keep them in the client assembly. By this, the cleint need not do a reference to any assembly for accessing the interface. Please comment on this. ThanksAbhang

  Was this answer useful?  Yes

dotnetrocks

  • Jun 7th, 2006
 

I think the best place is the client assembly by which the client need not add a reference for accessing the interface itself. Please reply I am not sure.

  Was this answer useful?  Yes

balajifortest

  • Sep 28th, 2006
 

Hai ,

 I think  single assembly is the best place for interface to place so that component can be used in other applications.

  Was this answer useful?  Yes

AryanTah

  • Mar 14th, 2007
 

I believe this depends on the kind of interface and component you are designing.
If you indend to share your interface among different assemblies then it makes sense to place the interface in a client assembly.

  Was this answer useful?  Yes

dubouku

  • Jul 26th, 2008
 

One of the Architectural goal of the interface is to create rules/contract for defining of what needs to be done in the component/implementation and most of the time you end up creating for specific layer/component (Like Data Layer/ Business Layer) and its not much of use outside that layer. If you have multiple business layers and if each has its own way of interaction/contract then its best to have interfaces within those components or if all layers have the same type of interaction/contract then have the interface as a separate DLL and used by multiple layers. Hope this helps. Kindly comment if i over baked it :-)

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions