Coding style is a geek topic that developers talk a lot about during coding collaboration interactions. One of the first things that come up, is usually “What case do we use”? I was in such a scenario recently, and thought I dug a little deeper to explore all the options.
Camel Case
Practice of writing compound words or phrases such that each word or abbreviation in the middle of the phrase begins with a capital letter, with no intervening spaces or punctuation.
Examples: johnDoe, lastConnectionDate
Reference: https://en.m.wikipedia.org/wiki/Camel_case
Pascal Case
Practice of writing compound words or phrases such that the first letter of each concatenated word is capitalised.
Examples: JohnDoe, LastConnectionDate
Reference: https://en.m.wikipedia.org/wiki/PascalCase
Snake Case
Practice of writing compound words or phrases in which the elements are separated with one underscore character (_) and no spaces.
Examples: john_doe, last_connection_date
Reference: https://en.m.wikipedia.org/wiki/Snake_case
Kebab Case
Practice of writing compound words or phrases in which the elements are separated with one dash character (-) and no spaces.
Examples: John-doe, Last-connection-date
Reference: https://en.wikipedia.org/wiki/Letter_case#Special_case_styles
Train Case
Practice of writing compound words or phrases in which the elements are separated with one dash character (-), no spaces and every word capitalised.
Examples: John-Doe, Last-Connection-Date
Reference: https://en.wikipedia.org/wiki/Letter_case#Special_case_styles