simmotech wrote:
Your name-clash argument is definitely better than this particular argument
(otherwise every object should have an "Object" suffix; "xxxTypedList" would become "xxxTypedListDataTable" or even "xxxTypedListDataTableObject")
Yeah, I agree, though it's the reasoning why classes which are Exceptions and thus derive from exception, should have an Exception suffix.
It's not consistent, I fully agree. (there are more silly things in these guidelines though. No 'Enum' suffix, though attributes have to have an Attribute suffix)
To me, "object", "entity", "item", "thing" are all just attributes of no particular meaning.
"Person", "Invoice", "Customer", "Employee" are articles (had to use a thesaurus to find another synonym of "object"
) with a specific meaning - their underlying inheritance structure is really just an implementation detail.
Using just the simple, everyday name in code will always be more readable in my eyes.
T'would be nice to have the option and leave its default to "Entity".
I'll see what I can do, it's not that simple though as it's a lot of work.
Actually, I love some of the naming conventions in LLBLGenPro:
Predicate and PredicateExpression - maybe its because I don't have an academic computer science background but I have to stop everytime I see these and mentally translate to "filter" for my simple brain.
But then at the other end of the scale there is a "RelationPredicateBucket" - I love having "Bucket" in my code!
I'm just grateful you didn't go the whole hog and refer to "tuples" and "attributes" instead of "rows" and "columns"
Cheers
Simon
Every time I read 'Tuple' I have to look it up myself, as I always associate 'tuple' with a pair.
'Predicate' is a term I looked up as well, as I needed a term for a where clause element, and it happened to be 'Predicate', so I kept that. I didn't use attribute because it would normally clash with the concept of '.net attribute' so I opted for 'field'
mikeg22 wrote:
Yeah, the guideline of putting the parent class name in the suffix is generally a good guideline to avoid confusion (and naming conflicts) but I think is a waste when it is pretty obvious what the class is all about. For example, I would never get confused in our application seeing the line:
Dim x as new Customer
and knowing that 'x' represented a customer. However, this is because we use our entities as actual domain objects so that they contain pretty much all their pertinent business logic. Using the entities for just data transport, however, should give them a suffix of DTO or something like that. In this case, the 'Entity' suffix is less descriptive than a 'DTO' suffix.
So, I'd vote for suffix configurability
Though isn't that a little limiting? I mean: if you intent to use them as DTO's, and at one point in time you have to use them as more than dto's, you're running into a problem, where you've named your class as if it does A, but it's doing A'