On 05/09/17 20:05, Yasuo Ohgaki wrote: > There is one principle that developers is better to follow. > https://en.wikipedia.org/wiki/Fail-fast > If we follow this principle, validation at controller makes sense. Since a large proportion of the data coming in is a result of input into a previously generated form, the data can often be validated in terms of basic structure before even needing to decide if the data set needs to be iterated? If things like 'maximum data size' can be established when the form is created, any data set larger than that can simply be killed off.
> Anyway, thank you for pointer for PDO validation. I didn't notice the > project. We may cooperate so that there aren't unnecessary validaiton > rule incompatibilities I've been pushing the idea of a single method of managing metadata for a long time. Most of the 'checking' loading down PHP now still misses the point and the database style of rules has been around since long before PDO and other abstractions messed it up. A single standard set of rules that can be used across the board from variable creation to checking data going out to forms and returns coming back and data between operations such as database activity. This is NOT 'typing' since that lacks the vast majority of checks that a decent validation will handle, but the much finer details such as limits and value sets. There is a vast discrepancy in how this is handled across databases, but the SQL standard does provide a base which databases are slowly evolving towards. -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
