Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Class naming issue

 
Joseph Zhou
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As I remember, there is rule says never use "s" for class name. But we have "seats" in business domain and also have "ProductCategories" in Cade's book(p169 class diagram), are we suppose to use such a naming convention?
 
Ramon Gill
Ranch Hand
Posts: 344
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the rule is an 'unwritten' rule (i.e. a best practice). Some people seem to ignore it. I don't think it matters that much, as long as the diagram is understandable.

Ray
 
Joseph Zhou
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It may don't matter at high level, but when you look at the 1-n association, or you are going to give the class attributes or operations, people may confused, ex: why we have such a method String getSeatNum() in Seats class?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic