9.5. User Interfaces Versus User Interfaces

You need to be a little careful when you talk about user interfaces. Care is needed because the terms can be used in multiple contexts. First, most people think of a user interface as being that part of a program with which the end user interacts. This type of user interface has visual objects presented on a form, such as frmMain has always used. The user then interacts with textbox, button, listbox, and a host of other types of objects on the form. The user interface, in this instance, serves as the primary means of getting input from and displaying results to the end user.

The second type of user interface does not require a visual representation at all. For example, all the properties and methods that have the public access specifier comprise the user interface for a class. In this case, the user is actually a programmer. The public properties and methods of the class form the API for that class and thus define how the programmer interfaces with it.

When you speak about the user interface in the context of a class, the "user" is a programmer working through the API to interact with the class. When you speak about the user interface in the context of a Windows form that has visual objects on it (such as textboxes and buttons), the "user" is the end user who is actually running the program. If you try to make a concerted effort not to confuse the two, casual conversations with other people can be confusing. The rule of thumb to follow: ...

Get Beginning C# 3.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.