18

Over the years I've used various naming conventions for services in my applications

for example:

[ClassName]Service  
[ClassName]Manager  
[ClassName]Factory  
[ClassName]Provider  
[ClassName]Helper

I generally only use the "Helper" suffix for utility classes that have no external dependencies.

However I find that there is a bit of a cross-over between the others, and wondered if there was any recommendations/standards/guidelines on what to use and when?

migrated from stackoverflow.com Jul 6 '11 at 11:45

This question came from our site for professional and enthusiast programmers.

  • 4
    How is this off-topic? "Are there any recommendations/standards/guidelines?" is a valid question - the answer could be, "Yes, here's a link to MS's guidelines. – Kieren Johnstone Jul 5 '11 at 19:28
  • So can if be moved rather than being closed? Still relates to programming IMO – Ben Jul 5 '11 at 19:32
  • @Kon, I disagree. It's a valid question for StackOverflow. stackoverflow.com/questions/495051/… – Filip Ekberg Jul 5 '11 at 19:32
  • @Ben, please let me know if you find an answer to this as I would like to see what guidelines people suggest. – Jethro Jul 5 '11 at 19:58
  • 4
    @svick well you make it sound like its absolutely obvious. I don't think it is. I could have a ProductManager that saves products or a ProductService that saves products. I could have a ConfigurationProvider or a ConfigurationFactory that generates a configuration. This is why I'm asking for an explanation. – Ben Jul 5 '11 at 21:45
7

MSDN has some advice on Type naming.

I also recommend reading Framework Design Guidelines book for a more detailed discussion on naming and lots of extra design advice.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy