Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Entity Naming convention - Part 2

 
Kumar Amit
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends

As per one of the use case in the assignment, user post requests for parts for bidding by suppliers. Is it ok to call it as PartRequest or should it be called BidRequest. The provided domain model calls it "Request" which is a very generic.
 
Rahul Mishra
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While naming entities or generic java classes..it is typically better to relate the names to reflect real world concepts (of course this isn't always true)

So, something like PartRequest would make sense..if it is a request for parts..
BidRequest..is misleading..because it seems like a request for a bid..but what you actually want to do is 'Bid'..

You are right...'request is way too generic'

 
Nilessh Ganu
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rahul Mishra wrote:While naming entities or generic java classes..it is typically better to relate the names to reflect real world concepts (of course this isn't always true)

So, something like PartRequest would make sense..if it is a request for parts..
BidRequest..is misleading..because it seems like a request for a bid..but what you actually want to do is 'Bid'..

You are right...'request is way too generic'



PartRequest will be used for only part requests. So should we go ahead and use 'Request' so that there could be enough room to accomodate items other than Parts in future?
I agree there are only part example mentioned in the BDM, should our design be generic enough so as to accomodate few requirements out of BDM?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic