Quantcast
Channel: patterns & practices: Prism
Viewing all articles
Browse latest Browse all 1878

New Post: How to get reference of the domain type from other Module (Asssembly) via loosely coupled way?

$
0
0
I am doing a design using PRISM framework and Domain-Driven design pattern. I have a question regarding the domain type reference between different Modules.

I have a Module (Assembly) called Order, another Module (Assembly) called Product. In the Model and ViewModel of the Order Module, we will use Product Class (Type) from Product Module.
How can I reference the Product type with loosely-coupled way.

I am thinking to do this by two ways:
  1. Define all the domain types in the Infrastructure Assembly, which will be referenced by all the Modules
  2. Define the interfaces in Infrastructure Assembly, and the domain types in the Modules will implement the according interface (Like Product will implement IProduct).
But I think these two solutions are not good. I hope I can get help from your guys here.

Thanks a lot.

Kevin

Viewing all articles
Browse latest Browse all 1878


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>