Let say I devise an architecture like this - an application consists of modules and modules uses domain-specific utilities to perform changes to the model or database.
An example, a registration module which shows the form, accept input and then use a registration utility which will perform the calls to insert the user info do the DB. Who is responsible for performing data validation?
1) The module, as it is the 'superior' passing data down to an utility 2) The utility, this way no suspect data would ever get through 3) Both should have thorough data validation 4) Some other arrangements
Thoughts? Opinions?