Rust DDD Practice: Attribute Macros Eliminate ID Value Object Boilerplate Code

Introduction: The Pain of ID Value Object Boilerplate Code and the Value of Macros In the previous article, we explored how to utilize the pattern in Domain-Driven Design (DDD) to implement Value Objects, particularly aggregate roots. We confirmed the core values brought by this pattern: strong type safety, compile-time checks, and zero-cost abstractions. However, when … Read more

Implementing DDD with ORM and PyQt6 Using MySQL

Implementing DDD with ORM and PyQt6 Using MySQL

SQL: create table School # Create table( `SchoolId` char(5) NOT NULL comment 'Primary key, school number', # Manually input, can also be designed to auto-increment, 5 characters, numeric, or a combination of numeric and characters, with code restrictions when saving data in text. `SchoolName` nvarchar(500) NOT NULL DEFAULT '' comment 'School name', `SchoolTelNo` varchar(8) NULL … Read more