开发者

a good list of nouns that are commonly used in class names?

开发者 https://www.devze.com 2023-03-27 11:43 出处:网络
I\'m tal开发者_如何学编程king about the secondary noun in a class name. Things like... Provider

I'm tal开发者_如何学编程king about the secondary noun in a class name. Things like...

  • Provider
  • Factory
  • Repository
  • Controller

etc...

Is there a list that's well understood? Naming classes is important for future maintainability so I'm wondering if we can make it easier on ourselves by using names that are familiar and have common meaning.


My 2 cents. Use names that are closer to the business that you are developing application for (Read Ubiquitous language). For technical artifacts/services stay closer to the names used in design patterns (GoF, GRASP, Core Patterns).

0

精彩评论

暂无评论...
验证码 换一张
取 消