• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Entities/Model - Validation and Calculation

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.

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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme ¬© 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.