Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 738151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T07:48:12+00:00 2026-05-14T07:48:12+00:00

From assembly(or module) perspective, what do you think of separation of Interface (1.assembly) and

  • 0

From assembly(or module) perspective, what do you think of separation of Interface (1.assembly) and its Implementation (2.assembly)?

In this way we can use some IoC container to develop more decoupling desing..
Say we have an assembly ‘A’, which contains interfaces only.
Then we have an assembly ‘B’ which references ‘A’ and implements those interfaces..It is dependent only on ‘A’.

In assembly ‘C’ then we can use the IoC container to create objects of ‘A’ using dependency injection of objects from ‘B’.
This way ‘B’ and ‘C’ are completely unaware (not dependent) of themselves..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T07:48:13+00:00Added an answer on May 14, 2026 at 7:48 am

    I see what you’re getting at but the only reason to separate interfaces into a separate dll is if another project is going to make use of them.

    If not, and the same project will use the same interfaces (but multiple times) there is no need to separate them. The IOC container can simply make use of the interfaces within the same assembly.

    Consider:

    Assembly 1:
        IFoo
    
    Assembly 2:
        IOC Container
        ConcreteFooOne : IFoo
    
    Assembly 3:
        IOC Container
        ConcreteFooTwo : IFoo

    Note, in this case the IOC container in each of the assemblies would be in charge of taking every IFoo instance and assigning it the correct ConcreteFoo.

    This makes sense to have a separate assembly for the interfaces. Each of the other dependent assemblies (1 and 2) can use the IFoo interface. On the other hand if ConcreteFooOne and ConcreteFooTwo where both in the same assembly there would be no need to split out the IFoo interface. An IOC container could still leverage “plug and play“, by switching concrete instances when required.

    Update

    Based on your comment you seem to be worried about tieing the IOC container to na assembly. This is not an issue, and separating the container out to a separate assembly is not a requirement. If anything, I’d class this as a code smell, let alone a pointless action.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some C# code that loads an assembly from a certain path like
I am trying to print the assembly from a Sparc Target. I already can
The exception is: The module was expected to contain an assembly manifest. (Exception from
My application is using MEF to export some classes from an external assembly. These
I have ProjectA which uses the Maven assembly plugin to pack some resources from
I downloaded the custom build Assembly from http://versionedtfsbuild.codeplex.com/ . I'm having major difficulty in
I have received an assembly from a third party. I need to add it
From managed code, how do I load a managed type from another assembly at
Is a .NET assembly loaded by the CLR when a class from the assembly
I am using tlbimp.exe to generate an assembly from a TLB file. I know

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.