This content has been marked as final. Show 1 reply
The save user function will involve using all three layers.
The facade is responsible for making the functionality available to your user (ie web front-end). It should generate valid method calls on the business layer. In your instance, the facade may test to make sure the username is not an empty string.
The business layer should ensure that any requests are valid according to your business needs.
In your case the business layer may check, for instance, that the name contains no swear/curse words.
The data access layer should be involved in doing nothing more than transfering between the physical database and the data access objects your business layer uses to represent it.
So I guess to directly answer your question, the DAO does not do any validation if possible, it will only do the saving part. The business layer is most likely to do the validation.
Hope this helps,