GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  Architecture
Go To First  |  Previous Question  |  Next Question 
 Architecture  |  Question 25 of 29    Print  
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?

  
Total Answers and Comments: 5 Last Update: July 26, 2008     Asked by: J.Chandra 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: dubouku
 
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 :-)

Above answer was rated as good by the following members:
ajayms2000, coumarine
June 07, 2006 15:13:01   #1  
Abhang        

RE: In designing component package / framework using I...
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
 
Is this answer useful? Yes | No
June 07, 2006 15:25:26   #2  
dotnetrocks        

RE: In designing component package / framework using I...
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.
 
Is this answer useful? Yes | No
September 28, 2006 04:56:51   #3  
balajifortest Member Since: August 2006   Contribution: 13    

RE: In designing component package / framework using I...

Hai

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


 
Is this answer useful? Yes | No
March 14, 2007 00:03:02   #4  
AryanTah        

RE: In designing component package / framework using I...
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.

 
Is this answer useful? Yes | No
July 26, 2008 11:53:24   #5  
dubouku Member Since: July 2008   Contribution: 1    

RE: 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 inh
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 :-)
 
Is this answer useful? Yes | NoAnswer is useful 2   Answer is not useful 0Overall Rating: +2    


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape