Open Closed

how-to-add-business-logic-to-DDD-services-added-to-solution #7767


User avatar
0
henrry.arujo created

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, and please first use the search on the homepage. Provide us with the following info:

  • ABP Framework version: v8.2.1
  • UI Type: MVC
  • Database System: EF Core - PostgreSQL
  • Tiered (for MVC) or Auth Server Separated (for Angular): Microservice Solution

Question: Can anyone provide details on how to add and configure a layered microservice into the new microservice template? I have successfully created a new microservice solution (using version 8.2.1) using ABP Studio (v 0.7.7) and the initial solution works successfully. Then when I proceeded to add a new DDD Microservice with the intention of importing the logic from an existing application inti it, I found that the DDD module created is does not have the baseline configuration (things like the base module logic, EF Configuration, DBContext settings, DB Migrations configuration, configfile settings etc). Is there any documentation or code sample one can use in order to enable new microservices into the new template?


9 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    here is the document https://abp.io/docs/latest/solution-templates/microservice/adding-new-microservices

  • User Avatar
    0
    henrry.arujo created

    Thank you for your response! I appreciate your help so far, and I’m looking for a bit more guidance to fully understand the solution.

    Could you or anyone else please provide more details on how to appropriately add business logic across the various layers, such as Application, Application.Contracts, Domain, Domain.Shared, and EF Repositories?

    Looking forward to your insights!

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    we have a video ABP Community Talks 2022.1 — Microservice Development: https://www.youtube.com/watch?v=TpyROlTBc50

  • User Avatar
    0
    henrry.arujo created

    The question since the beginning about using microservices using the new ABP Commercial version 8.2.1. Let me be more specific - how to add business logic across the various layers, such as Application, Application.Contracts, Domain, Domain.Shared, and EF Repositories in the new ABP Commercial Microservices solution version 8.2? Is there any documentation how to add business logic, and custom repositories for the version 8.2?

    Please note, i have reviewed the documentation for the new version. It only addresses how to create the solution and how to run it, but so far I could not find any details about how to add you own business logic, nor how the layers are represented. Can anyone point me in the right direction? Again, please note this is for the Commercial Microservices Template DDD version 8.2 and up.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Whether it is 8.2.1 or 8.2.2, the way to write code is the same

    And we also provide an example: eShopOnAbp https://github.com/abpframework/eShopOnAbp

    Here are many business services you can refer to how to create business logic

  • User Avatar
    0
    henrry.arujo created

    I appreciate your intention to help, but it is clear we are not in the same page of the book - this feels like going in circle. I will appreciate if you can either take a deeper look to what it is that I am asking, or if you could escalate it to someone else who may be more familiar with the issue at hand.

    The question is about using **the latest Microservices solution ABP Commercial (v8.2.1). **

    To be more specific: these steps https://abp.io/docs/latest/solution-templates/microservice/adding-new-microservices outline how to add a new microserive to an existing ABP Studio solution. But the new service created with these steps has no layers.

    I tried following the same steps using the option to add a DDD Microservice. When the DDD microservice is created, it comes with layers, but the new DDD Service added does not have the required Module References, project references, etc. Basically, the template provided through the option of creating a DDD microservice is missing the baseline implementation.

    What I have been asking all this time is this: once I have my microservices solution created using ABP Studio up and running, where can I find documentation how to add a new DDD microservice, configure it to work within the scope of the ABP Studio, and then add the business logic in the different layers: Application, Application.Contracts, Domain, Domain.Shared, EF Repositories etc.

    I hope it makes this clear what is the type of question I'm asking for. If you need more clarification, please let me know, but I think it is clear by the context of what I am asking what the issue at hand is.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    okay, I thought you were using an old microservice template.

    The new microservice template is simpler; it abandoned Application, Application.Contracts, Domain, Domain.Shared.

    You can add entities, DTO, app service interface and permission definitions in Contracts project.

    add app services, EF Repositories in XXXService project

  • User Avatar
    0
    henrry.arujo created

    I was able to add a new microservice into ABP Studio:

    how can I find details about developing the UI? If there is any sample code I can use, I will greatly appreciate it.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Add Service.Web reference to Saas.Web project and configure the module dependence

Made with ❤️ on ABP v9.0.0-preview Updated on September 19, 2024, 10:13