Am Donnerstag, den 25.10.2007, 11:06 -0700 schrieb redphantm: > I have also seen discussions regarding > the model doing the validation. Should the model contain a function > that > uses Zend_Validate and returns the resulting object?
My opinion to this topic is a very clear "YES", for two reasons. - Murphy teaches that things will go wrong if they only get the option. So if your models dont validates their input, one (whoever) consument will operate with invalid data on your models. This is "Murphies Law" and its true ;-) - I comply to the "skinny controller - fat model" convention. Your business logic is a part of the model, and the data structures of your application are imho the most important part of you business logic, thus, the model. Why should this important part be decoupled from your models? The controller shall only controll the flow of the operations that are applied to the models. But this is just my two cents worth... Best regards /Ralf
