Skip to content

Latest commit

 

History

History
50 lines (32 loc) · 1.78 KB

gadr--filename-convention.md

File metadata and controls

50 lines (32 loc) · 1.78 KB

Filename convention

Context and Problem Statement

Which naming convention should be used for graphics in websites?

Considered Options

Pros and Cons of the Options

Camel case without project name prefix

genericFilename.png

  • Good, because it leads to the shortest possible name
  • Bad, because it is harder to read if names include all caps
  • Bad, because can be easily confused with similarly named graphics from a different project
  • Bad, because it requires chorded keystrokes

Dasherization without project name prefix

generic-filename.png

  • Good, because it is easier to read if names include all caps
  • Good, because it does not require chorded keystrokes
  • Bad, because can be easily confused with similarly named graphics from a different project
  • Bad, because it leads to longer names

Camel case with project name prefix

projectGenericFilename.png

  • Good, because the project name makes it easier to different between similar named graphics from different projects
  • Bad, because it is harder to read if names include all caps
  • Bad, because it requires chorded keystrokes

Dasherization with project name prefix

project-generic-filename.png

  • Good, because it is easier to read if names include all caps
  • Good, because the project name makes it easier to different between similar named graphics from different projects
  • Good, because it does not require chorded keystrokes
  • Bad, because it leads to longer names