buildingbibby.hashnode.devWhy findAllShelves(Long bookCaseId) Is a Lie — And What I Renamed It To TLDR: I renamed findAllShelves(Long bookCaseId) to findShelvesByBookcaseId(Long bookcaseId) — fixing a semantic contradiction where "All" implied no filter but the parameter was a filter, aligning wi21h ago·6 min read
buildingbibby.hashnode.devFrom Fat Service to Use Cases: Extracting the Shelf Application LayerTL;DR ShelfService was doing too much — validation, querying, deletion orchestration, and summary mapping all lived in one class. Extracted three explicit use case classes: CreateShelfUseCase, Delet1d ago·13 min read
buildingbibby.hashnode.devDead Code, Duplicate Methods, and a JPQL Query That Crossed Module LinesTL;DR Four methods across ShelfFacade, ShelfService, and ShelfDomainRepository were all doing the same thing — fetching shelves for a bookcase — under different names. Collapsed them into a single p1d ago·11 min read
buildingbibby.hashnode.devThe Purge of DTOs from the Core: A Domain-Driven RefactorTL;DR ShelfFacade — my hexagonal inbound port — was returning ShelfDTO, ShelfOptionResponse, and even BookDTO from a foreign module. Ports must speak domain language, full stop. ShelfDTOMapper (intr2d ago·15 min read
buildingbibby.hashnode.devTwo Mappers, Zero Layer Violations: Fixing My Hexagonal ArchitectureTL;DR ShelfMapper was living in infrastructure but translating application-level DTOs — a quiet layer violation that had been there for multiple commits. Split into two mappers with explicit, non-ov2d ago·12 min read