Reputation: 5237
I'm writing a pretty simple email mime parser for an application I'm developing, and was thinking it'd be a good idea to create a dumb data class to make as 'an email' but as an object.
This is all well and good, and this might be a terrible question for SO, but alas, I am asking anyway. What would you call said dumb data class?
As I'm writing the project in Symfony 2.2 I thought using the word 'Entity'; as broad a term as it is, wouldn't make as much sense and could cause confusion because of Entities being used in DocTrine. So, what's the term that's used for this kind of thing? Just to store data and potentially use methods on it, like an entity, to format or retrieve other bits of information.
Upvotes: 0
Views: 218
Reputation: 76880
If you use the class just to pass data around, that's a DTO (Data Transfer Object from Java) in my opinion.So EmailDto
could work
If you add methods to it i'd just use Email
as the name of the class, just to describe what is.
Upvotes: 1
Reputation: 83
How about calling it (the Germans among us are free to ROFL ;-) ):
POPO - Plain Old PHP Object
Upvotes: 1
Reputation: 127
Generic names for classes are things like Object, Entity, Thing, Data, Class, Handler, etc. Descriptive names are really good to avoid confusion, though. YMMV
Upvotes: 0