Best practice for DAO pattern?
问题 I've seen a lot of codes use a service-dao pattern , I don't know the origin of this pattern . It force the front layer call service , then delegates some of the service task to dao. I want to ask : Does DAO layer do purely data access related task ? What about things like exception encapsulation? Is there any other pattern can be used to replace this or better than this ? I think pojo domain models and transaction scripts make even simple problem became complicated , is it possible to