On wednesday my company will have an open ended discussion whether to
standardize hungarian notation or pascal/cammel case notation. We'd
love to recieve some feedback on what other people are using out there
and why. Thanks!
We use pascal and cammel case. Not only because it is the standard
coding convention for .NET as seen in
*
http://msdn2.microsoft.com/en-us/library/ms229043.aspx
*
http://msdn2.microsoft.com/en-us/library/ms229045.aspx
--- from coding standards on MSDN ---
Do not use abbreviations or contractions as parts of identifier names.
For example, use OnButtonClick rather than OnBtnClick.
------
In addition we stay way from Hungarian notation because I encourage my
developers to take a more object oriented approach to their naming by
naming things by functional group names. Such as
LoginName
LoginPassword
LoginGoToLocationList
LoginSendButton
Instead of the Hungarian way which scatters the names all over the
list like:
txtName
txtPassword
ddlLocation
btnSend
In addition another benefit of not using Hungarian is the ability to
be more flexible and agile when coding.
If you decide all Lists are going to end with the postfix "List" for
drop down, combo boxes, and everything in between. It is a lot easier
to adjust the interface if somebody wants to go from a combo box to a
drop down list.
SomethingList
However if you use Hungarian you have to rename all your variables to
go from a drop down list to a combo box, if you still want to maintain
your naming convention, which is the original reason why you are
having this meeting.
ddlSomething
cmbSomething
Hope this helps.