Refactor Staff Validation


I'm not keen on having the Staff object being injected the StaffRepository just to be able to find staff with the same name, this validation I feel is suited to moving to a Specification object (UniqueStaffNameSpecification) and moved back up to the Task layer.
PhotoValidator should be renamed to a more Specification like object (ValidPhotoSpecification) then both this Specification and the one mentioned above should be combined (StaffSavingSpecification) and invoked from the Task layer.
The above should help the Staff be decoupled from StaffRepository, and also make the validation concerning staff be handled in a uniform fashion.
Closed Nov 16, 2008 at 2:34 PM by mcromwell