你的位置: 码友网首页 / 资讯源列表 / Refactoring to Value Objects

关于[Refactoring to Value Objects]的摘要:

Value Objects are a part of Domain-Driven Design, and Julie Lerman and I cover them in our DDD Fundamentals course on Pluralsight. Even if you're not applying Domain-Driven Design to your application, you can take advantage of refactoring your business classes to avoid code smells like primitive obsession (follow the link for more on refactoring and code smells). To demonstrate this concept, I'm going to show a simple class as it might start out, and then show how I would refactor it. (This is actually based on a conversation I just had with one of NimblePros' clients. I figured I might as well share my thoughts more broadly than just with that team! The actual types have been changed, but the principles can be applied generally.)

原文地址: https://ardalis.com/refactoring-value-objects/

收录时间: 2021-09-09 浏览量: 1449 分类: 架构设计

| 1 收藏 | 0