I have some POCOs and there are corresponding persistence objects that do the CRUD. What is a good name for the persistence objects? I've seen people use the term "service objects" for these, but when I think service, I think WCF. Maybe "persistence objects" is the best, but I'd like to hear what other people think.
+2
A:
Data Transfer Objects, or DTO's, is a common way to refer to these objects.
See Martin Fowler's definition: http://martinfowler.com/eaaCatalog/dataTransferObject.html
Kevin Swiber
2009-06-23 14:20:26
+2
A:
One common convention is the Repository pattern when dealing with persisting objects to a datastore, so you would expect to see naming conventions in the form of (given an corresponding type Poco):
PocoRepository
Joseph
2009-06-23 14:20:32
I actually am using the repository pattern with NHIbernate and Ninject, so repository would probably be the best answer in my specific case here.
Josh Close
2009-06-23 14:40:32
+1
A:
Perhaps just adding "persistor" to the name, like Person_persistor etc, if the persistence objects just are used for persisting.
kaze
2009-06-23 14:20:56
Entities have nothing to do with persistence. He clearly stated that he has separate objects that do persistence.
epitka
2009-06-23 14:23:24
epitka is right; Entities will typically be the objects that are to be persisted.
Fredrik Mörk
2009-06-23 14:29:25