views:

55

answers:

1

Here's what this chunk of code does: Pulls back the 6 most recent members and displays a gallery on the home page -- photo, age and location.

My struggle here is whether I should be referencing anything in the SP/DAL method that says "gallery". The data layer only cares about the data, it shouldn't even know a gallery exists.

So my instinct is telling me to call the SP and DAL method something like: GetNewMembers and then call the BLL method: GetNewMemberGallery().

How would you go about naming these?

+1  A: 

Your instincts are spot on. The DAL should not care about the ultimate intention of the data, and your naming reflects this. The BLL shows that the intent is to retrieve the new members for a gallery while the DAL shows that its intent is to retrieve new members. As this could result in your DAL item being used in many different ways, e.g. GetNewMemberGallery(), GetNewMemberPortfolio() and so on, that you've sufficiently removed the business side of the naming.

Pete OHanlon