I see many people using a technical way of naming their objects whereas I would keep them in a business readable way as thats the way how they show up in the reporting done to the stakeholders.
- Are there any standard guidelines?
Any comments on below
Here are mine
- Follow the visible element name/title on the screen or the associated label text
- Only first character uppercase (so if on screen lowercase also first character lowercase)
- No replacement of spaces with underscores
- No prefixing like txt, btn, edt, tbl, ..... as from the class property you know what it is
- No replacement of !@#$%^characters just apply rule 1 and only in exceptional scenario's replace it. (First of all your programming language should be able to handle the (unicode) string)
If for whatever reason you need a more technical name just apply an algorithm on it like
- Replace space with nothing / empty string
- Strip out non [a-zA-Z] characters
- Prefix based on the class type of the element