Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Engish_for_IT_Students.doc
Скачиваний:
74
Добавлен:
25.11.2019
Размер:
838.14 Кб
Скачать

Unit 6. Programming

Visual Programming

The object-oriented, event-driven environment of modern programming has changed how information flows through a program. It has given the control of a program's actions to the user.

In the past, programmers created program-centered processing, in which the flow of action was dictated totally by the program. Even in an interactive program, where information flowed in two directions, the central focus was always the program with its preset logic and processing path.

Object-oriented, event-driven programming has changed the programming environment by putting the user in control. The user now chooses which actions are used, chooses how each action is started, and directs the flow of the entire activity. As a result, the programmer cannot presume which objects the user will choose or the order in which they will be chosen.

Event-driven programs are designed around the interface options available to the user. An event is initiated by the user. When the user clicks an icon with the mouse, presses the Enter key, or moves the pointer on the screen, an event occurs. Each event causes an object to gather its data, structure it, and process it.

Event-driven programs are created in a visual WYSIWYG environment that uses a visual programming language (VPL). A VPL allows the programmer to create visually the graphical images the user will see and use.

The programmer combines graphical icons, forms, diagrams, and expressions to create two-or three-dimensional programs to run in a graphical user environment.

Some of the most commonly used visual languages are Prograph CPX for the Apple Macintosh, Microsoft's Visual Basic, and Visual C++ for the Windows environment. Visual programs for Java and scripting environments – JavaScript and VBScript – have recently emerged. These languages use graphical objects, such as icons, forms, or diagrams, to create programs that run in a visual environment. Programming in a visual language involves placing controls in the graphical presentation so that users can interact with them. Controls are the various tools through which the user can enter data, begin a process, or indicate a choice.

The Open dialog box (found in nearly all Windows-based programs), for example, is filled with various types of controls, such as buttons, lists, text boxes, and more. Placing controls on a graphical environment typically is done using the drag-and-drop technique. The programmer chooses the control to be made available to the user for an event and places it on the window form. Usually, the available controls are contained in a menu, list, or dialog box for the programmer's ease of access and use, as in the Visual Basic toolbox.

Visual programming is much easier for the programmer because it is based on how a programmer (and the user) sees items on the screen rather than on the structure of the program. As in many other areas of computer software, the visual interface is making highly complex functions accessible to the everyday user.

Third-generation Programming Languages (Part I)

There are many higher-level languages and there is no reason why you should have to know the details of each. However, it is always helpful to know a little about the more common languages you may hear about in programming circles. Some of the fading third-generation languages include the following:

FORTRAN (FORmula TRANslator). FORTRAN was designed specifically for mathematical and engineering programs. FORTRAN has not been widely used with personal computers. Instead, FORTRAN remains a common language on mainframe systems, especially those used for research and education.

COBOL (COmmon Business Oriented Language). COBOL was developed in 1960 by a government-appointed committee to help solve the problem of incompatibilities among computer manufacturers. Although COBOL was once popular, especially on mainframe systems, it has lost some of its following over the past ten years.

BASIC (Beginner's All-Purpose Symbolic Instruction Code). BASIC was developed in the mid-1960s, mainly as a tool for teaching programming to students. Because of its simplicity, BASIC quickly became popular. When the use of personal computers became widespread, it was the first high-level language to be implemented on these new machines. One early version of BASIC shipped on the newly popular PCs was GWBASIC. As you might have guessed, GW stands for "Gates, William" so you can see how influential Bill Gates was in the early development of PC software. Today, popular examples of BASIC include Microsoft's Visual Basic, Visual Basic for Applications (the scripting language behind Microsoft Office), and VBScript (which is common in many Web pages).

Pascal. Named after the seventeenth-century French inventor Blaise Pascal, Pascal was intended in the early 1970s to overcome the limitations of other programming languages and to demonstrate the benefits of structured programming. More recently, developers have taken Pascal a step further, and it is now well-known for its implementation of object-oriented principles of programming.

Third-generation Programming Languages (Part II)

Unlike such third-generation languages as FORTRAN, COBOL, BASIC, Pascal, the following languages still have a thriving following and a bright future:

C. Often regarded as the thoroughbred of programming languages, C produces programs with fast and efficient executable code. C is also a powerful language. With it, you can make a computer do just about anything it is possible for a computer to do. Because of this programming freedom, C is extremely popular with professional developers, although it is now being replaced by C++.

C++. C++ is the object-oriented implementation of C. Like C, C++ is an extremely powerful and efficient language. Learning C++ means learning everything about C and then learning about object-oriented programming and its implementation with C++. Nevertheless, more C programmers move to C++ every year, and the newer language has replaced C as the language of choice among software development companies.

Java. Java is an object-oriented programming environment for creating cross-platform programs. When the Internet became popular in the mid-1990s, Java's developer, Sun Microsystems, redeveloped Java to become a programming environment for the Web. With Java, Web designers can create interactive and dynamic programs (called applets) for Web pages. Essentially, a Java program is a self-contained, semicompiled function that makes no reference to outside code or operating system functions. Thus, Java code is fully compatible with most any computer and operating system. To create Java code, a developer writes the applet and then compiles it into bytecode. To run the Java applet, a user accesses the bytecode, perhaps over the Internet. Then, using a Java virtual machine, the client PC converts the bytecode into machine code appropriate to that particular computer.

ActiveX. Microsoft's answer to Java is ActiveX. ActiveX code creates self-contained functions similar to Java applets that may be accessed and executed by any other ActiveX-compatible program on any ActiveX system or network. At present, ActiveX is implemented on Windows 9x, Windows NT, and Macintosh systems, and there are plans for supporting UNIX also.

Of the third-generation languages, Java is probably the most important for the future development of PCs and the Internet. In fact, some developers see Java as a way of redefining the PC itself. By replacing the current expensive and platform-defining CPU with a cheap Java-decoding microchip, developers can create a machine that gets all of its software from Java servers on the Internet. To use such a machine, you would load a Web browser (also written in Java), connect to the Internet, and access Java programs for all of your software needs. If this prediction comes true, then all PCs will be both inexpensive and fully compatible.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]