2.0.1 • Published 26 days ago

yl-ddd-ts v2.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
26 days ago

Introduction

This repository showcases my dedicated exploration of Domain-Driven Design (DDD) coupled with the functional programming paradigm.

In the realm of DDD, the conventional approach involves leveraging Object-Oriented Programming (OOP) and an object model to implement tactical strategies. My journey began by adopting this methodology for my Python library, crafted specifically for DDD practices in Python projects (You can check this repo here - https://github.com/YLcorp/python-ddd-seedwork).

However, over time, I came to the realization that OOP often steers our attention towards the tactical aspects of DDD, overshadowing the strategic elements—arguably the crux of DDD. Engaging with OOP patterns, such as the decorator pattern and grappling with the complexities of inheritance, diverted focus from modeling real-world objects to contending with the intricacies inherent in OOP. This unintentional shift led to a lapse in concentration on the more crucial strategy pattern.

Consequently, I made a deliberate shift towards incorporating Functional Programming into DDD. This approach streamlines the implementation of tactical patterns in DDD, allowing for a more concentrated effort on the core logic—the Essential Complexity. It frees us from the Accidental Complexity introduced by OOP, enabling a renewed emphasis on modeling the true essence of the domain, essential for robust business logic in the core domain.

Seedwork: https://martinfowler.com/bliki/Seedwork.html

CAVEAT:

If your service is simple, DDD approach may unnecessarily make your app more complex because of the level of abstraction it make.

You should not practice DDD-liked style blindly (like me).

This seedwork is best for the DDD architecture style.

Usage

yarn add node-ts-seedwork

Issues

Its test coverage is far from 100%, and not coverage with jsdoc annotation too. So it may have many bugs, so please create issue report on its github remote.