Tuesday, December 25, 2018

Differnet Ways of Integrationg Bouded Context

Differnet Ways of Integrationg Bouded Context in Small to Medium to Big level apps

On one side we have monolithic. Everything is packed.
UI, Classes, DB on one single vertical blocks

DDD bounded context and micro service ask the vertically divide this huge block in small manageable slices.

Big Vertical Block is hard to manage. But on the whole DB Apps spectrum, such apps are hardly 1% those are as much fat.

In the Context of ASP.NET MVC we divide this vertical block as follows.

One Solution having Root Level Folder for each Bounded Context

Each BC, has its own UI, App Service, Domain Layer, Data Layer, Unit Testing and Integration Testing Layers

UI Level Integration
Within UI, different application can be integrated. When we click some URL, Button or Tab, Menu Item, URL is change and we switch to another UI project by calling it URL and we start work in that context. Authentication and Authorization info may be shared to user need to login again.

DLL Level Integration
Within One Solution, one project can add any other project as library/DLL and call the logic inside them.

Web API Level Integration
Web APIs or Restful APIs are mechanism to expose the FUNCTIONALITY on URL that can be called by any application code (Other Web API/Restful Services or Application Service) Data can be exchanged in XML or JSON

Web API calls  Web API
Application Service calls  Web API
Domain Service calls  Web API
Factory Class calls  Web API

DDD also gives us patterns for integrating BCs and shared Data and invoke Behaviors in other domains (Domain Events) in a loosely coupled way. How to loosely couple the BCs by Domain Events? This helps us avoid the Leaky Abstractions.


No comments:

Post a Comment