Method Names for Data Retrieval
Ben Nadel recently posted a blog entry about moving queries to service layers (something I am a big fan of). Both the blog entry and the comments that followed were great and well worth the read. I especially liked Hal Helm's comment about differentiating between queries that are necessarily the same and those that are accidentally the same.
One thing that came up in this discussion was how to name the methods that retrieve data. One example was "getArticlesByAuthorID()" (I'm just picking one of many that followed this pattern). To me, this is a code smell. The method name describes not only what you want, but how you are going to get it.
I would do it differently.
Thanks for the words of support. I am actually not certain if anyone was positively suggesting that source of action (I read through the comments rather quickly), but it spurred my thought to share how I would handle the situation.