Welcome Guest, Not a member yet? Register   Sign In
Entities/Model - Validation and Calculation
#2

1) One can place validation in the Entity so that validation is handled automatically, and is closely associated with the data it's validating (though, personally, because I find that in my typical usage, any given field frequently has several different conditions that sometimes do and sometimes don't apply, this started looking complicated... and I've resorted to having a separate 'validation class' that handles user input, which the Controller invokesĀ separate to the Entity class (an approach that also has it's own inherent drawbacks)).

2) "Business rules" are typically supposed to be placed in the Model.
Reply


Messages In This Thread
RE: Entities/Model - Validation and Calculation - by Gary - 09-06-2020, 01:51 AM



Theme © iAndrew 2016 - Forum software by © MyBB