I just noticed that almost all the key values in property files are in dot separated names. eg -some.key=some value Does anyone know why? Just asked out of curiosity.
It's basically a convention that makes it easier to see what properties are related.
For example:
person.title="Title" person.surname="Surname" job.description="Some description"
It's easy to see which properties are related and, using a smart editor, you can then chose to only see the properties for person. A few IDE's and editors can even use this to add code completion for you, as you know you want to work with person, but might not remember the exact property.
We sometimes underestimate the power of readability, yet a convention like this makes it easy for anyone to add, edit or maintain these properties. This becomes very important when working in teams or when on-boarding juniors.
There is no any specific reason for that but it's just for better understanding of programmers nothing else. you can also directly write key=value without using any kind of "some" :-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With