Do objects with validation logic in their domain really represent their real world counterparts?
I asked a question about whether validation behavior should be treated the same as other types of behavior in regard to the concept of OOP being “data + behavior”. I got some good answers back that addressed the question from the philosophical point of view and confirmed that the answer to that question seems to be yes.
Domain Model, validation, and pushing errors to the model
Looking into DDD and something I noticed is that business logic should be in the model, otherwise you just have property bags. That said how do you handle pieces of validation that require a trip to the database?
Domain Model, validation, and pushing errors to the model
Looking into DDD and something I noticed is that business logic should be in the model, otherwise you just have property bags. That said how do you handle pieces of validation that require a trip to the database?
Domain Model, validation, and pushing errors to the model
Looking into DDD and something I noticed is that business logic should be in the model, otherwise you just have property bags. That said how do you handle pieces of validation that require a trip to the database?
Why all consider UAT a validation activity? It contradicts the original idea
Virtually any book dealing with software testing mentions that user acceptance testing (UAT) is an ultimate validation activity, often quoting Boehms informal definition: “Validation: Are building the right product?”
Coerce bad input or always crash early
The general consensus seems to favor the Crash Early approach, the most reputable source being the acclaimed Pragmatic Programmer book.
What is best practice to handle whitespaces when letting the user edit the configuration, the name=value pairs?
For instance, you let the user define the notorious path variable. How do you interpret apppath = C:Program FilesApp
?
Use of validators for simple validations
I’ve been working in Liferay code, and I’ve come across this construct a few times:
Use of validators for simple validations
I’ve been working in Liferay code, and I’ve come across this construct a few times:
Pattern for validating rules having different signatures
I have a class in charge of responding to an input event and maybe triggering another event. To decide, it has several rules to check.