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 6617401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:42:00+00:00 2026-05-25T20:42:00+00:00

I have an application under development that is following a modular application design. There

  • 0

I have an application under development that is following a modular application design. There is a ‘core’ vertical stack that provides common, central services such as authentication/authorization, logging, data access, etc. Context-specific areas are implemented in modules that reference the core assembly in the same logical layer.

The application is a service app with a facade layer, domain layer and infrastructure code containing the data access code. Each module will implement a domain layer assembly. If the module has a public API, it will also implement a facade assembly.

For example, the solution contains:

  • Core.Api – Facade assembly for the core API
  • Core – Domain assembly for the core services, entities, etc.
  • Core.Data – Core data access assembly
     
  • ModuleA.Api – Facade assembly for module A (references Core.Api)
  • ModuleA – Domain assembly for module A (references Core)
     
  • ModuleB.Api – Facade assembly for module B (references Core.Api)
  • ModuleB – Domain assembly for module B (references Core)
  • enter image description here

    (and so on. We’ll have about 24 modules when done.)

    All of this is bound together using DI with Unity as the IoC container. The WebHost project defines the configuration where the various implementations are mapped to the interfaces they fullfill.

    This approach is not simply for logical purposes but to allow us flexibility in implementation (i.e. we can change the implementation of a module without breaking or even touching the other code). It also makes it extremely ease to divide work across teams and to extend the application with new modules with little risk of regression error in other code.

    My question is what to do when ModuleB requires one or more types defined in ModuleA? Is it acceptable for ModuleB to reference ModuleA or do I need to move ModuleA into Core?

    UPDATE

    In looking at implementing some of the changes discussed below I ran into a gotcha that leads me to this clarification…

    There are two places where my modules are inter-dependent. Following the approach discussed below, I can move the interfaces and types I want shared from Module1 to Core which allows ModuleB to make use of them without tightly coupling ModuleA and ModuleB. However, I also need to use some of the data contracts defined in ModuleA.Api for the service operations in ModuleB.Api. This makes me question the design.

    Because of IP, I can’t describe our exact use-case but suffice it to say that ModuleA has an EntityA domain object. ModuleA.Api defines the EntityContractA data contract (DTO) that is exposed by the public API. ModuleB.Api has a method that requires EntityContractA as a parameter then delegates to a method in ModuleB that accepts EntityA as a parameter.

    Again, moving EntityA into Core solves the domain layer problem but doesn’t help me with the facade layer. Moving EntityContractA into Core.Api makes the whole thing smell a bit.

    Here’s an example what I need to accomplish:

    In ModuleB.Api.ServiceFacadeB:

    public EntityContractB FilterBy(EntityContractA contractA)
    {
        var entityA = Mapper.Map<EntityContractA, EntityA>(contractA);
    
        var entityB = domainService.FilterBy(entityA);
    
        var contractB = Mapper.Map<EntityB, EntityContractB>(entityB);
    
        return contractB;
    }
    

    where domainService is ModuleA.ServiceB:

    public EntityB FilterBy(EntityA entityA)
    {
        // Do work
    }
    
    • 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-25T20:42:00+00:00Added an answer on May 25, 2026 at 8:42 pm

      The good news: what you describe is actually a good architecture with clear seperation of concerns and modularity patterns. It allows your teams to develop modules independent from each other and only have dependencies on each others interfaces (facade / API). This is a best practice!

      The (potential) bad news: If you would start by directly referencing Module1 from Module2, you will single-handedly break this beautiful architecture. The team creating Module1 only needed to care about keeping their interface stable, but because of the direct reference now also need to be careful with changing their implementation.

      My suggestion: If you need a type in Module2 that is now defined in Module1, make sure you move it into the Core API or the Module1 API classes. This formalizes the fact that your assembly is depending on those types and makes it clear they need to be kept stable.

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

    Sidebar

    Related Questions

    I have a Flex 4 client application that is under development in parallel with
    I have an application running under WebLogic that is using standard forms authentication. The
    I have a Swing Application running under Linux, that has problems to display accented
    I have an ASP.NET 2.0 application under IIS that has the functionnality of exporting
    I have a WPF application that runs fine under XP as an administrator. When
    I have a web application that runs fine under IIS5 or IIS6. I just
    I have inherited a Java application (servlets) that runs under Tomcat. For historical reasons,
    I have an application under development using ASP.NET MVC 2 with jQuery. I have
    I have Application settings stored under HKEY_LOCAL_MACHINE\SOFTWARE\MyCompany branch. Settings must be same for different
    I have a WPF application using Aero Glass. When using the application under a

    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.