开发者

Naming: WorkspaceViewModelFactory or WorkspaceVMFactory or WorkspaceViewModel_Factory?

According to naming conventions, which one is recommenced?

* WorkspaceViewModelFactory
* WorkspaceVMFactory
* WorkspaceViewModel_Factory
* WorkspaceVM_Factory
* Workspace_ViewModel_Factory
* Workspace_VM_Factory

In case that matters: I'm a hobbyist programmer, I'开发者_如何学运维m the only one who has to read my code.


The first one WorkspaceViewModelFactory.

Quote #1 from Capitalization Conventions

When an identifier consists of multiple words, do not use separators, such as underscores ("_") or hyphens ("-"), between words. Instead, use casing to indicate the beginning of each word.

This rules out all the options that have _.

Quote #2 from General Naming Conventions

In general, you should not use abbreviations or acronyms. These make your names less readable. Similarly, it is difficult to know when it is safe to assume that an acronym is widely recognized.

This rules out all the options that have VM in the name and leaves just one clear option WorkspaceViewModelFactory.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜