How to Avoid Anemic Domain Model
▻https://hackernoon.com/how-to-avoid-anemic-domain-model-5e1c3e6fe4d0?source=rss----3a8144eabfe3
With user registration exampleI intentionally took a widely spread and simple domain that everyone, I guess, is familiar with. I want to demonstrate how it can be viewed differently, with object-thinking in mind. This post can be viewed as a sequence of steps that I take when modeling some domain.First, let’s talk about formsForms nowadays are utilized as a tool for data validation with an intention to make something useful with this data. Quite often I see that validation resides aside from business-logic. In this case data is treated as being passive: first, validate it, then do this, and then do that. Well, it’s great, and it’s called Procedural programming. The next step is to move the validation logic, intrinsic to domain concepts, to those value-objects and entities. This is what #ddd (...)
#oop #software-development #software-design #software-architecture