Blog - BlogPost - BlogPostComment vs Blog - Post - Comment

Posted by Anton Gogolev on Stack Overflow See other posts from Stack Overflow or by Anton Gogolev
Published on 2010-03-16T12:35:18Z Indexed on 2010/03/16 12:46 UTC
Read the original article Hit count: 679

Filed under:
|

Don't really know how to formulate the title, but it should be pretty obvious from the example.

More specifically, what rules do you use for naming "dependent" classes. For example, Blog is a pretty descriptive name itself, but how do I deal with posts? BlogPost or Post? Clearly, first name clearly expresses that it's a "subordinate" class, but this can quickly get out of hand with BlogPostComment, BlogPostCommentAttachment, etc. Post, on the other hand, looks like an entity completely unrelated to Blog and is easier on the eye.

What are your rules/best practices?

© Stack Overflow or respective owner

Related posts about naming

Related posts about subjective