I am designing an enterprise solution which consists of modularized products within a product range using Entity Framework code first to define the domain model and provide the data access.
ProductRange.Authentication ProductRange.Gateway ProductRange.OrderSystem ProductRange.MarketingSystem
Each of these products (solutions) will have similar layers, currently:
Projects in each solution:
ProductRange.OrderSystem.Model (contains code first POCOs) ProductRange.OrderSystem.DataContext (contains the dbContext) ProductRange.OrderSystem.DataAccess (contains the Generic Repository) ProductRange.OrderSystem.Service.DomainLogic (contains business logic) ProductRange.OrderSystem.Service.ApplicationLogic (contains application logic) ProductRange.OrderSystem.Presentation.AdminWebsite ProductRange.OrderSystem.Presentation.CustomerWebsite
Some of the products will need to access the domain logic of another product, especially they will all need to access the ProductRange.Authentication but also ProductRange.MarketingSystem will need to query ProductRange.OrderSystem
I am thinking to expose the domain logic between products in the range via a WCF service. But I will also need to reference the product locally (e.g. creating project references).
How should I go about implementing this? Should I create a WCF service e.g. ProductRange.OrderSystem.WCF which calls the domain logic and exposes it or should my domain logic itsself be a WCF service? If the latter, would I always have to reference my domain logic via the WCF, even from the local ApplicationLogic?
I guess I am looking for some guidance about what layers to have and how best to provide inter connectivity between the solutions.