Some Pros and Cons with the Customer Classes Solution
As you might guess, I have gathered a lot of advantages about using custom classes. But not to sound like a salesmen, I also have found some drawbacks.
Some advantages are listed here:
Self-contained classes, so the client might (if desired) receive business rules, too.
Object orientation, with all its advantages. For example, it is pretty direct to apply classic design patterns, such as the GoF ones.
Typically type-safe operations.
Some disadvantages are as follows:
A lot of extra work required if you do it by hand
Somewhat weak for integration as is with heterogeneous clients
The disadvantage of the extra work is actually a big one. For starters, it's very complex to create a solid framework for a domain model regarding persistence. And when you are done with that, you might find that your productivity is bad because you have to write a lot of code by hand; therefore, you need to write tools.
The problems regarding complexity and productivity are well knownsee, for example, Martin Fowler's book Patterns of Enterprise Application Architecture (Addison Wesley Professional, 2002). The common recommendation is to buy a product.