Debasish Ghosh

Functional Patterns in Domain Driven Design applied to Financial Models

Functional Patterns in Domain Driven Design applied to Financial Models

Domain driven design (DDD) is a technique of modeling a system where the primary focus is on the domain itself. The model is constructed as a selective abstraction of the knowledge of the domain. Traditional implementations of DDD have used object­oriented techniques in class based languages. In this talk I will take a completely different approach to demonstrate how the DDD principles can be implemented more effectively using functional programming principles. Immutable algebraic data types to model entities, updating them functionally using lenses, sequencing domain validations (aka Specifications in DDD terminology) using monads are some of the techniques that lead to codebase that compose well and yet remain concise and succinct. In the talk I will demonstrate how pure functional abstractions can help construct the Ubiquitous Language of the domain using higher order functional abstractions and patterns.

Functional programming techniques when used with a statically typed language offer powerful techniques of reasoning about the correctness of your model. This is another important aspect when you consider financial systems that run in the back­office of brokers and custodians. In this talk I will discuss how referentially transparent functional abstractions help you achieve equational reasoning on your model ensuring correctness of domain behaviors without any manually written test suite. So at the end of the day you have a model that speaks the domain vocabulary, is extensible, can be composed to build bigger abstractions out of smaller ones and can be reasoned about.

About Debasish

Debasish is a consultant with Eligotech BV working on data analytics tool development using Hadoop, Scala, Akka and other synergistic technology stack.

Previously Debasish was the chief technology evangelist at Nomura Research Institute Financial Technologies India Pvt. Ltd. where he specialized in leading delivery of enterprise scale solutions for various clients ranging from small ones to Fortune 500 companies. Debasish received his BS in Computer Science and Engineering from Jadavpur University, India. His main areas of interest are functional programming, domain specific languages and NoSQL databases. He loves programming in Scala and Clojure and is an active contributor in quite a few open source projects. Debasish is an occasional speaker in conferences and has quite a few publications to his name. He is a senior member of the ACM and has authored the book “DSLs In Action” published from Manning.

 

Github: debasishg

Twitter: @debasishg

Back to conference page