Java data transfer object naming convention?

前端 未结 5 1373
不知归路
不知归路 2020-12-04 05:44

Given this scenario where you have \"transfer objects\" (POJO\'s with just getters/setters) which are passed by a client library to your API, what is the best way to name th

5条回答
  •  春和景丽
    2020-12-04 06:22

    I dont think there is a best practice or convention for a class exhibiting this kind of behavior. I personally dont like the word Object in any of the class names. You could either use some qualification like Poko.Car or use some naming convention like Car (for POJO) CarDa (for data access) CarBiz ( for business domain class)

    Or if you dont mind the word object in a class name go for something like CarDto (Car Data Transfer Object)

提交回复
热议问题