Open Closed

Developing a custom module solution that gets data from other custom module solutions #1045


User avatar
0
smutairi created

Here is the scenario:

I am developing separate parts of an application each with its own module solution that has everything including the UI.

but I ran into an issue, how do I create a Global Search UI in a demo solution that uses these modules?

Example:

  • I have 3 custom module solutions (Products, Stocks, Cars)
  • I have 1 Demo Application solution that adds these a Nuget Packages and I can see them in the Menu of the demo solution.

I need to have a search box with a drop-down list (Products, Stocks, Cars) that does search and return results on the demo solution.

how do I architect the projects to accomplish this scenario?


2 Answer(s)
  • User Avatar
    0
    cotur created

    Hi @smutairi

    There are several ways to do that, and actually it is not suggested to do, because modules must be unique and do not depends to others, each module should do everything in it's environment.

    But, for me the best way is creating a new Entity and table, let's call it MyAwesomeEntity. By using Events you can fill the your new table whenever Product, Stocks, Cars created, updated and deleted.

    So in the application, you can only search for MyAwesomeEntity.

    Here is useful documentation: https://docs.abp.io/en/abp/latest/Distributed-Event-Bus Please check the Providers section also. https://docs.abp.io/en/abp/latest/Distributed-Event-Bus

    About the distributed event bus implementation

    Yes! The default implementation works just like the local event bus, if you don't configure a real distributed provider.

  • User Avatar
    0
    smutairi created

    I see what you mean, so the suggested way is to have search functionality in each custom module. and in the Demo Application I create a UI to handle all the search from different modules in one location.

    sounds good thanks.

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11