|
Programming
|
| Background |
| This class
emphasizes achieving program clarity through the proven techniques of structured
programming and event-driven programming. Event-driven programming and object-oriented programming will be the key programming methodologies for the next decade. You will work with many objects and events in this course, but you will discover that the internal structure of those objects is often best built using structured programming techniques. Also, the logic of manipulating objects is often best expressed with structured programming. Visual Basic is one of the world's most widely used high-level languages. Although Visual Basic is an example of an interpreted language, recent versions of Visual Basic make it possible to compile Visual Basic programs to produce machine language executables that run at the high speeds previously attributed only to languages like C. Visual Basic is an example of a graphical-based language. A graphical-based language allows the user to work directly with graphics. Graphical-based languages can be used to develop Windows programs quickly without having to learn an additional software package. Visual Basic programs are created in an integrated development environment (IDE). The IDE allows the programmer to create, run and debug Visual Basic programs conveniently. Visual Basic is the world's most widely used Rapid Application Development (RAD) language. There are several versions of Visual Basic: the Learning Edition, the Professional Edition, and the Enterprise Edition. The Learning Edition provides fundamental programming capabilities. The Professional Edition provides a much richer set of programming capabilities than the Learning Edition and is the choice of many programmers. The Enterprise Edition is used for developing large-scale computing systems that meet the needs of substantial organizations. Visual Basic is not backward compatible. In fact, some of the programs in the text do not work with older versions.
|
|
Event-driven Programming This section will cover visual programming and event-driven programming. With visual programming, the programmer has the ability to create graphical user interfaces (GUIs) by pointing and clicking with the mouse. Visual programming eliminates the need for the programmer to write code that generates the form, code for all the form's properties, code for form placement on the screen, code to create and place a Label on the form, code to change foreground and background colors, etc. The programmer creates the GUI and writes code to describe what happens when the user interacts with the GUI. This interaction generates events which are passed to the program by the operating system. Writing the code that responds to events is called event-driven programming. With event-driven programs, the user dictates the order of program execution -- not the programmer. With the user in control, using the computer becomes a much more user-friendly process. Example: a Web browser. Event Procedures are Visual Basic procedures that respond to events and are automatically generated by Visual Basic. The programmer adds code to respond to specific events. Only events that are relative to a program must be coded. |