DEV Community

Discussion on: Cleaning up your codebase with a clean architecture

Collapse
 
buzzdan profile image
Dan Mordechay

How would you apply clean architecture with functional programming style ?
Is it possible ?

Thanks,
Dan

Collapse
 
barryosull profile image
Barry O Sullivan

Hi Dan,
I think it's entirely possible. Functional programming doesn't have objects, but you can still compose functions in the same way you compose objects. This means you can build high level functions (domain/usecase layers), that internally use lower layer functions that interact with infrastructure, in the same way that you'd inject services in the article above.