Validating domain objects

17-Aug-2017 05:08

Many of the frameworks I’ve worked with, promise to separate responsibilities with MVC.In practice, they end up coupling everything to everything.

has very powerful abilities of adding restrictions to unrestricted data (similar to dependent types known in statically compiled languages), but you cannot create the whole set of validation schemas from them even in a simple application.

Validate all input your application has, but be more confident with the internals. Let me ask you more clarification questions: Our goal is make sure any object exists only in valid states: