Data Access Object (DAO)
Data Transfer Object (DTO).
-------------------------------
DAO is a class that usually has operations like save, update, delete. Whereas the DTO is just an object that holds data.
-------------------------------
The advantage of the DAO layer is that if you need to change the underlying persistence mechanism you only have to change the DAO layer, and not all the places in the domain logic where the DAO layer is used from.
The advantage of DTO layer is that it adds a good deal of flexibility to the service layer and subsequently to the design of the entire application
No comments:
Post a Comment