Sometimes I saw some people use "dumb data" or "dumb data object" to describe something, but I am not clear about the definition of "dumb data".
Is dumb data mean some member in object that does not used by the object itself, but for others that use the object?
eg:
class Process{
public:
int parentProcessId;
//other property
};
int main(){
Process p1;
int p1Id=p1.getParentProcessId();
Process p2=Process.getProcessPyId(p1Id);
return 0;
};
and is "dumb data object" means all properties in objects are used to store values only (for example: object that map columns from sql)?
As mentioned in the comments, a 'dumb data object' is an object which contains no behaviour, only data. Often also referred to as Data transfer objects (DTO)
They have no methods or constructors.
These objects can be serialized and then deserialized between different languages and retain the same information. If they contained behaviour this behaviour would need to be created in both language representations of the object as behaviour cannot be serialised, only the data.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With