duai5344 2013-04-18 11:46
浏览 19
已采纳

什么名字会给一个愚蠢的数据类?

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.

  • 写回答

3条回答 默认 最新

  • doudu8291 2013-04-18 11:49
    关注

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥188 需要修改一个工具,懂得汇编的人来。
  • ¥15 livecharts wpf piechart 属性
  • ¥20 数学建模,尽量用matlab回答,论文格式
  • ¥15 昨天挂载了一下u盘,然后拔了
  • ¥30 win from 窗口最大最小化,控件放大缩小,闪烁问题
  • ¥20 易康econgnition精度验证
  • ¥15 msix packaging tool打包问题
  • ¥28 微信小程序开发页面布局没问题,真机调试的时候页面布局就乱了
  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题