Tagged articles
Value Object
16 articles · Page 1 of 1
This article demonstrates how ValidX, a JSR-380-compliant validation library with 100+ Chinese business validators, integrates into DDD layered architecture, showing annotation-based DTO validation, chain-style API for value objects, aggregate roots, and domain services, with code examples for each layer and best practices for avoiding common pitfalls.
Aggregate RootDDDDomain Service
0 likes · 20 min read

The article demonstrates how to correctly apply the DRY principle by refactoring seven duplicated notification service classes in Spring Boot 3.5.0 using the template method pattern and a NotificationMessage value object, consolidating 40 lines of repeated validation, logging, and error handling into a single abstract base class.
DRY PrincipleJavaNotification Service
0 likes · 12 min read

Learn how to tell whether a domain concept is an Entity or a Value Object by asking if its identity matters or only its attributes, see concrete examples with Money, Address and Order, understand immutable design, proper equals/hashCode implementation, and validation through unit tests.
ImmutableJavaValue Object
0 likes · 13 min read

The article explains that an Entity is distinguished by a unique identifier while a Value Object is defined solely by its attributes and must be immutable, illustrating the concepts with Java Entity, record, and JPA mapping examples, and providing three practical questions to decide which to use.
DDDJPAJava
0 likes · 14 min read

The article explains why traditional three‑layer architectures let business logic bloat inside services, demonstrates the pitfalls of anemic domain models with a 7,000‑line SalaryService example, and shows how DDD’s rich domain model restores rule ownership and maintainability.
Anemic Domain ModelJavaService Layer
0 likes · 10 min read

A mis‑designed phone number column can silently degrade index performance, overload CPU, and cause a cascade of timeouts in a 2‑billion‑user system, but by treating the phone as a domain value object, using a normalized VARCHAR, aligning indexing rules, and applying consistent sharding and migration strategies, you can prevent the database from collapsing under high concurrency.
Database DesignMySQLSharding
0 likes · 31 min read

This article provides a comprehensive introduction to Domain‑Driven Design (DDD), covering its origins, core principles, layered architecture, key concepts such as entities, value objects, aggregates, bounded contexts, and how DDD improves communication and maintainability in complex software systems.
Bounded ContextLayered ArchitectureValue Object
0 likes · 6 min read


JavaEdgeAug 23, 2024 · Backend Development
This article delves into the tactical design of Domain‑Driven Design, explaining core building blocks such as entities, value objects, aggregates, domain events, repositories, application services, and domain services, and shows how they help keep business logic centralized and expressive.
AggregateApplication ServiceDDD
0 likes · 9 min read

The article explains how the Value Object pattern, combined with PHP 8.1/8.2 features like readonly properties and named arguments, can eliminate primitive‑type validation duplication, prevent parameter‑order mistakes, and ensure immutability, thereby making PHP code more robust, maintainable, and self‑documenting.
Design PatternImmutablePHP
0 likes · 12 min read

This article redefines what constitutes good code by using a star‑chart analogy, exposing typical spaghetti‑code pitfalls, and introducing three design patterns—Value Object, Side‑Effect‑Free Function, and Intention‑Revealing Interface—to help developers refactor and write maintainable software.
Value Objectcode qualityintention-revealing
0 likes · 13 min read

This article explains Domain‑Driven Design fundamentals, covering how to define bounded contexts and subdomains, the criteria for domain division, practical modeling experiences, and detailed guidance on modeling entities and value objects with illustrative Go code examples.
Bounded ContextDDDValue Object
0 likes · 14 min read


ITPUBJul 8, 2022 · Fundamentals
This article explains the core DDD concepts of entities, value objects, and aggregate roots in Go, detailing how unique identifiers differ from database primary keys, when to use value objects versus primitive types, and best practices for generating and handling IDs within aggregates.
Aggregate RootDDDGo
0 likes · 17 min read


ITPUBJul 6, 2022 · Backend Development
This article walks through applying Domain‑Driven Design in Go, focusing on value objects: their definition, immutability, implementation details, common pitfalls with pointers and serialization, practical code patterns, and how to model enums, offering concrete guidance for robust backend development.
Best PracticesDomain-Driven DesignEnum
0 likes · 15 min read

The article explains the core traits of entities—identity and continuity—through domain‑driven design examples, demonstrates why a Message should be modeled as an entity, and discusses the reasoning behind treating Sender and Recipient as value objects or entities in a messaging domain.
MessageValue Objectdomain-driven design
0 likes · 11 min read

This article explains the core characteristics of entities—identity and continuity—using domain‑driven design principles, analyzes why a Message should be modeled as an entity, and argues that senders and recipients are better represented as entities rather than value objects in a messaging system.
Message ArchitectureValue Objectdomain-driven design
0 likes · 11 min read

The article explains the core characteristics of entities—identity and continuity—using DDD concepts, demonstrates why a Message in a messaging scenario qualifies as an entity, and argues that senders and recipients (contacts) should also be modeled as entities rather than value objects.
DDDMessageValue Object
0 likes · 12 min read
