Functional Domain Modeling
To improve as functional programmers, we need to learn how to model our domain in a functional way.
In object-oriented design, we start identifying the business entities that are involved in the business process. Business entities are real-world concepts, such as customers, orders, products, or invoices.
Once the relevant business entities have been identified, the next step is to map them to classes in our code and encapsulate the behavior of a particular concept. So, the aim is to create a software system that closely mirrors the real-world processes.
For example, we might create a Customer class that encapsulates data about a customer’s name, contact information, and purchase history, as well as behavior such as ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access