DEV Community

Swarup Kumar Mahapatra
Swarup Kumar Mahapatra

Posted on

3 1

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)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more