Refactoring from Anemic Domain Model Towards a Rich One
Building bullet-proof business line applications is a complex task. This course will teach you an in-depth guideline into refactoring from Anemic Domain Model into a rich, highly encapsulated one.
What you'll learn
Having a rich, highly encapsulated domain model is essential if you want to succeed in building building bullet-proof business line applications. In this course, Refactoring from Anemic Domain Model Towards a Rich One, is going to show you how to properly implement it. First, you'll cover why Anemic domain is an anti-pattern and its relationship to functional programming. Next, you'll learn about encapsulation and how to achieve it in your domain model. Finally, you'll touch on some important refactoring techniques. By the end of this course, you'll understand practical techniques that will help you recognize this anti-pattern in your code base and refactor it into a bullet-proof one.
Table of contents
- Introduction 0m
- Importance of Using Value Objects 3m
- Identifying Value Objects 7m
- Recap: Identifying Value Objects 1m
- Gathering Validation Rules into a Single Place 9m
- Recap: Gathering Validation Rules into a Single Place 2m
- Fixing Persistence 5m
- Introducing Dollars Value Object 7m
- Recap: Introducing Dollars Value Object 1m
- Introducing Expiration Date Value Object 9m
- Summary 2m
- Introduction 0m
- Code Overview 2m
- Refactoring Customer: Constructor 3m
- Refactoring Customer: Collection 8m
- Recap: Refactoring Customer's Constructor and Collection 1m
- Refactoring Customer: Status 11m
- Recap: Refactoring Customer Status 1m
- Refactoring Purchased Movie 6m
- Pushing Logic Down: Promote Customer 2m
- Pushing Logic Down from Services to Entities 5m
- Recap: Pushing Logic Down from Services to Entities 1m
- Refactoring Movie 5m
- Summary 3m