GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Microsoft  >  Architecture

 Print  |  
Question:  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?



July 07, 2008 11:53:24 #5
 dubouku   Member Since: July 2008    Total Comments: 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 :-)
     

 

Back To Question