vendredi 26 avril 2019

Is it a good idea to storage validations in DAO?

I have web application. The structure: controller which take an entity and DAO which save the entity and making some other actions. Is this a good idea to check stateless validations (size of name for example) in controller and sate validations (duplicate email in db for example) in DAO. Is there good practices for that? Can you advise some resources or book to get it?

Aucun commentaire:

Enregistrer un commentaire