Sabtu, 27 Desember 2008

Visual Programming

What is Visual Programming?

Visual Programming involves the development of software usually with a Graphical user Interface (GUI). Examples of visual programming language environments are:

· Visual Basic

· Visual C++

· C++ Builder

· Delphi

All use an underlying programming language (BASIC, C++, Pascal), with a visual environment to aid in the building of sophisticated Windows applications, which can contain a variety of components such as windows, buttons, menus, graphics, dialog boxes, etc. These components provide the user with a Graphical User Interface enabling easy interaction with the software.

Developing software that uses a GUI is much more complicated than developing text based software, as all the visual components and their various events have to be coded. Luckily a visual programming environment will help with much of this. Most standard visual components used on a Windows system are already available for use in the programming environment, saving the programmer the task of building the required components from scratch.

Modern Windows operating systems are pre-emptive, multitasking systems. This means that they are capable of doing what seems like many different operations at the same time. In order to carry out these multiple tasks, the operating system will pass control to and from the processes currently running, as required. So if a Windows program is inactive for any period of time it must return control back to the operating system in order to allow another task to use the processor. Visual programs are usually event-driven, giving control to the processor while waiting for an event to happen.

An event is a message sent to the program or operating system signalling that something has happened. For example:

· A button click

· A key press

· A window has come into / gone out of focus

When an event happens in a program, the program must have an event handler routine for that event, which will contain instructions of code describing what action to take. When running, event-driven visual applications will effectively sit and wait for an event to happen. This could be some interaction from the user, a message from the operating system, or a message from another program or process.

Task 1: Produce a table listing as many events as possible, which happen in your Windows operating system, stating the event action and its results

Tidak ada komentar:

Posting Komentar