In general DTOs are just a lot lighter-weight than datasets.If you have a DTO that exposes properties, then you can pass around a single "row" with very little overhead, and you can still databind a List<T> of your DTOs if you want to.
However, if you are looking for true RAD and don't have on ORM tool, then datasets are a lot faster, that is, unless you use the enterprise library data access app block, and a macro to create your DTOs in seconds. So there is a design-time vs run-time efficiency argument.
A third point is that if you are looking for true interopability on your web servies, data sets are generally a bad plan, only .NET clients can understand and use them. Mind you, arguably if you are doing this you might want to do it as XSD-first, and then xsd.exe -> DTOs.
Main Topics
Browse All Topics





by: bele04Posted on 2007-05-28 at 23:07:12ID: 19170354
One advantage, or in my case, the only time I use DAOs is when I need to transfer data among different tiers. Like for example, I have a client and a server application. With DAO, I can return only the data that the client requested in a manner that it can understand. Like when requesting customer data, I can pass a Customer object containing the said data. It's also easier to maintain both applications this way. Other than that I just use datatables or datasets.