DEV Community 👩‍💻👨‍💻

Swarup Kumar Mahapatra
Swarup Kumar Mahapatra

Posted on

Understanding Encapsulation

I have been reading Domain Driven Design for a while.

I realized, creating Value Objects and building Entities by composing Value Objects is the best way to explain Encapsulation.

Getters and Setters do not explain encapsulation at all.
Agree?

Top comments (0)

Create an Account!

👀 Just want to lurk?

That's fine, you can still create an account and turn on features like 🌚 dark mode.