Yesterday I developed an ASP.NET server control that rendered a single-selection ListBox before the user had made a selection, and a DropDownList after a selection was made. Developing the control was straight forward, finding a good name for the class was tricky.
There are many innovative was to name classes, variables and other things. In How To Write Unmaintainable Code the author suggests using the book 20,001 Names For Baby. The solution for my naming problem was not far from this, I used the Ikea catalogue!
When trying to come up with an appropriate name for a control it is a good practice to try to find some real-life metaphor for your control. Window blinds was one that came to mind, but I wasn’t comfortable with this because windows are established metaphors in GUI design and blinds cover windows. Window Blinds is also a well-known product by Stardock Software.
In Norway, which is where I live, “dropdown” curtains are common in bedrooms. This type of curtain has actually lent its name to drop-down menus and similar in the Norwegian language. The control I designed shared it’s functionality with this kind of curtain. It could be extended, like a ListBox, or it could be “rolled-up” like a DropDownList. We have a good word for this type of curtain in Norwegain which is “rullegardin”. However I couldn’t recollect to have heard an English word for such a curtain. A direct translation of the Norwegian word would be “roller curtain”. RollerList would not be a descriptive name for the control.
Having found my metaphor, all I had to do was to browse the catalogue on the British Ikea site a find one of these curtains. Only one of the items in the curtains and blinds category was of the same type that are popular in Scandinavia and this was actually called a roller blind. However there was a similar blind, which was a perfect match when it came to describing the behavior. This was a roll-up blind, and the metaphor was perfect. I had created a RollUpList.