Similar Posts

Leave a Reply

Your email address will not be published.

31 Comments

  1. Great Article,
    What if we have a table that is shared for two or more modules? Or module tables have a relation with other tables in different modules?

    1. Hi, so this is where bounded context would come into picture.
      1. You should either cut your application in such a way that 2 modules don’t depend on each other’s table.
      2. If there are cases, where it is not avoidable, you can still make use of interfaces! Imagine 2 Modules, M1 & M2. If there is a case where M1 needs access to M2’s table, you should add the interface to the SHared.Core project and implement it in the M2.Infra Project! And you make use of the interface at Shared.Core wherever you want in M1

      I hope I cleared your question.
      Regards

  2. What is the point of having `ICatalogDbContext`? It contains DbSet properties hence it’s always dependent on EF Core. So what it the purpose of this abstraction?

  3. Great Article,
    But there is a downside that we still have to re-initialize the host api if we add a new module.

    1. There is no a downside. It is a monolithic application and will be deployed as a whole. If new module comes in then you should add reference to this module. This is done only one time. Modules are not plugins, they are not plug-n-play.

    2. Even Microservices require re-deployment at times. I am currently working with microservices at the office, and I am well aware of its complexities. Plug and Play Architecture is a whole new risky game. I really find the Modular Architecture much more reasonable for mid-level applications.

  4. Could modules interact with each other?
    for example, ModuleA does some magic and wants to send a notification, and we have a NotificationModule.
    how would they work together?
    through the shared layer?

  5. Great article, Mukesh. Thanks for sharing. At this point, FluentPOS solution is already available and I’m taking the opportunity to see the implementation of a complete solution using the Modular Architecture approach.

  6. I really liked this, thanks for taking the time to write it up.

    A continuation would be great, but I could always dig into the fluentPOS code too.

    I’ll definitely take the time to look through your other articles

  7. Hi
    please advice on how to add logging, redis cache and business logic. Reading through your blog on nlog and redis, but guessing the right project to add these. I would add nlog at core to capture the exception around controllers. But where to add redis and business logic for each module?
    Regards.

    1. You can add logging to the common infrastructure project.
      Business logic stays in each module as I explained.
      Redis also can be put into the common Infra Project as it’s likely to be used by all the other modules as well.
      You can refer to the implementation of fluentPOS for details.

      Regards,
      Mukesh

      1. Hi Mukesh,
        Firstly, accept appreciation from my side for your great work. Secondly, please guide how can one can use React as a frontend.

  8. Absolutely Great Blog Here. This Blog Has Quite In-depth Information Regarding Modularizing Web Applications Using Modular Architecture In ASP.NET Core

  9. Absolutely great blog here. This blog has quite in-depth information regarding modularizing web applications using modular architecture in ASP.NET Core.

  10. Great article Mukesh.
    I just have a doubt related to the fact that in your application the concept of joining between the different entities / tables is lost.
    For example, assume that the application must export all the orders of a customer and for each line report the item description.
    To determine the item description instead of using a simple include mediator uses.
    What do you think about it? Instead of executing an inner join query you execute n queries as there are order lines.

  11. Dear Mukesh, I am following your blogs for the past months (if not year).
    Today we are building a midsize App (for now – soon it will grow) and we are torn between Microservice and monolithic, I’m planning to use your BlazorHero until I read this Modular-Monolithic.
    Removing Microservice from our option, Do you suggest to go with Modular-Monolithic?

    Best Regards,
    fadz

  12. i always avoid to use modular architecture just because of unitofwork, what should i do if i want to perform multiple operations in diffrent modules as 1 transaction, 1 failed than whole request rollback or commit as single transaction.
    for example
    whenever item sale in sale module than update the inventory/stock module, what if sale done successfully and inventory can’t be updated because of some reason ?

    just read whole article because of this thing to find

  13. Hi Mukesh!
    My comments has not diaplayed on the page for pre moderation, or wrong site working?
    And another one thought, Many Thanks for so clean and easy understanding approach and article!

  14. Thanks for the article. Especially love the screenshot of the solution layout.
    Many explanations of clean architecture just discuss it at a high level without implementation detail examples.

    I’m curious what you think about using Orchard Core Framework (not the CMS) to build modular applications. I found your article and orchard framework in my research and wondered if you had experience/opinions about it.

  15. Great Article !
    I cloned and run your project successfull.
    But, Can you tell me how do add extended attribute in dashboard for product ?

    Thanks

  16. Great article. It looks like the fluentpos repo has been removed and replaced with a microservice repo. I found it a much better example compared to the article repo.

    Would it be possible to make the original available again? Perhaps in an archived state.

    Thanks