Valid vs NOT valid objects?
The question is quite common in software development. Given an instance of a class, you want to know when to check if a class is valid or not. Do you skip validations before executing an action or do you first check if the instance is valid before executing an action?
Let’s see a simple example. Image an entity called
FlightReservation and some validation or better business invariant rules that require a flight reservation to be valid when it contains no more than