Backend Development 12 min read

DDD Practice in E-commerce Product Center Middle-Platform Service Construction

The article details how NetEase Yanxuan applied Domain‑Driven Design to reconstruct its Product Center middle‑platform, using strategic and tactical design, COLA layered architecture, and an event‑driven mechanism to eliminate duplicated logic and heavy coupling, cutting code volume by roughly two‑thirds while addressing entity scope, model richness, and microservice granularity challenges.

NetEase Yanxuan Technology Product Team
NetEase Yanxuan Technology Product Team
NetEase Yanxuan Technology Product Team
DDD Practice in E-commerce Product Center Middle-Platform Service Construction

This article introduces the application of Domain-Driven Design (DDD) in rebuilding the Product Center middle-platform service at NetEase Yanxuan e-commerce platform.

Background and Pain Points: The Product Center handles core data maintenance for products and categories, supporting internal business collaboration. With rapid business growth, the original architecture could not meet internal and external demands. Starting from 2019, the team began middle-platform architecture transformation using DDD to rebuild existing business models.

Key Pain Points Identified: 1) Business logic duplication - multiple similar code segments created during iterative development; 2) Heavy module coupling - business collaboration and product management logic deeply intertwined.

DDD Implementation Approach: The core approach follows: extract core business logic → abstract processes → standardize capabilities. The implementation includes strategic design (defining ubiquitous language, identifying sub-domains, creating bounded contexts), tactical design (identifying entities, value objects, aggregates, and domain services using event storming), and encoding processes.

Architecture Design: The team adopted COLA (Clean Object-Oriented Architecture) as the unified template, which emphasizes domain model-centric design and ensures domain layer independence. The system follows a layered architecture with clear separation between application layer, domain layer, and infrastructure layer.

Event Mechanism: Implemented an event-driven mechanism supporting event submission, asynchronous control, and exception retry for business compensation.

Results: Through refactoring, core logic was moved to the middle-platform service, reducing logic processing and code volume for consumers. In the product creation case, code volume was reduced by approximately 2/3.

Discussions: The article also discusses challenges encountered: entity scope sizing issues, model development pattern selection (anemic vs. rich domain models), and service granularity recommendations (suggesting sub-domain level splitting for microservices).

software architecturemicroservicesDomain-Driven DesignDDDmiddle platformE-commerce ArchitectureCOLA architectureevent storming
NetEase Yanxuan Technology Product Team
Written by

NetEase Yanxuan Technology Product Team

The NetEase Yanxuan Technology Product Team shares practical tech insights for the e‑commerce ecosystem. This official channel periodically publishes technical articles, team events, recruitment information, and more.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.