Originally posted by Udham Singh:
Thanks Peter !
I'll check it out. I've started implementing Data in the non-OO way so I dont know how much I would change it.
Your welcome, I'm going the rich client route and have designed my server to provide exactly the interface described in the project specification. The first thing my client code does is to wrap this in a DAO so that all it deals with are Transfer Objects containing fields defined in their natural types, eg. size is an int, smoking is a boolean and date is a Date. Note that DAO is stateless, this means that questions relating to making network connections, sessions, threads etc, are outside its domain. The DAO is lightweight and is just an adapter between your business logic and a data source.
Various authors have differing terminology for the data objects that are returned by DAOs. The current official J2EE term is "Transfer Object", it used to be "Value Object", and its often called a "Data Transfer Object". The term "Value Object" was abandoned because others, especially Martin Fowler, use that term for things like the String class.