DEV Community

Discussion on: Domain-driven Design (DDD): File Structure

Collapse
 
ccunnin297 profile image
Cole Cunningham • Edited

For a monolith, it's especially useful, as it makes it easier to find what you're looking for when you have a lot of files.

For swapping between different third party libraries or protocols, Steve's answer is on point. Splitting infrastructure from the domain with a common interface / adapter will allow you to swap the inner workings of infrastructure without having to rip apart your domain layer.

Collapse
 
stevescruz profile image
Steve Cruz

That makes sense, because there are many massive sized monolithic codebases, so it's imperative to structure it in a manner to find things easier. Thanks for the tip Cole.