What should a DTO be composed of?
Is it recommended to have validation outside and just infer the results in DTO in terms of boolean.This way I do not have to keep on repeating logic in web tier as well as in middle tier.
For instance consider this...
I have to check if custNumber appears in sorted order for front end but my back end is expecting it in some other sort order and the bridge between them is DTO.
I would be essentially duplicating the sort code in both web/back end tier.
Can I have this sort logic in DTO itself or have getters and setters for getting the sort order in DTO for both tiers separately and have helper class sort it accordingly.