CSC/ECE 517 Fall 2010/ch7 n 7i OE
Visual Object Oriented Programming
Visual programming languages are a class of languages where the program is defined by a series of interconnected pictoral icons rather than textual statements. Many graphical programming languages are designed to be accessable to those without formal training in programming. Theoretically, a visual programming language might be easier for a novice to comprehend, as rather than memorizing syntax and methods, the user is presented with a pallette of icons to choose from and can lay them out in a logical and familiar way, similar to an electric circut diagram.
Visual programming languages often have several disadvantages. Though the basic functionality may be more accessible to novices than text-based languages, there is a tradeoff. It may be more difficult to implement complicated algorithms or control paths. Complicated programs are difficult to keep clean. and "spaghetti" code may result. Many visual programming languages have been developed for a host of reasons, but few have been widely adopted. The two examples below are exceptions, and have garnered a significant user base.
Labview / G
Labview is a proprietary programming language developed by National Instruments. It is widely used in laboratory environments for control and operation of experimental equipment. LabView's target users generally do not have formal training in computer programming so it is designed to be intuitive. The program is graphically represented in a manner similar to an electrical schematic. Labview is considered to be a dataflow language, where operations are performed as soon as their inputs become valid, rather than when they are encountered in code.
As of version 8.2, LabView or G incorporates several object-oriented principles. Given LabView's orientation towards non-programmers, the language's designers made some tradeoffs between implementing all aspects of object-oriented languages, and maintaining simplicity. The result was that two of the tenets of OO programming were implemented: Encapsulation and Inheritence.
Encapsulation. LabView implements classes and supports the concepts of public, private, and protected methods, but private data only. Private data within classes is accessed and modified by accessor methods (known as virtual instruments, or VIs.)
Inheritance. Classes can inherit other classes. Because there is no protected or public data, all data from parent classes must be accessed through the accessor methods.
There are several significant differences between the implementation of Object-Oriented principles in an imperitave language like Java or C++ and LabView. In Java, classes are passed by reference; in C++ they can be passed by reference or value. In LabView, they are passed by value only and therefore may be duplicated by the compiler. Many existing OO design patterns, specifically those from the Gang of Four book, depend on classes that are passed by reference. Therefore, the LabView developers have designed a different set of design patterns LabVIEW Object-Oriented Programming: The Decisions Behind the Design [[1]] [[2]]
Prograph
Prograph is a programming language developed in the 1980s and 1990s primarily for the Macintosh in the 1980s and 1990s. While LabView is designed specifically for controlling and collecting data from experimental equipment, Prograph is intended as more of a multipurpose language. Similar to LabView, it follows the dataflow paradigm.
Prograph supports encapsulation and data abstraction through classes with single inheritance.
Prograph achieved its greatest adoption for small applications developed in-house potentially by non-programmers. Though it faded to obscurity after the company developing it went bankrupt in 1995, since then, user groups have brought about its reemergence as an open standard.
Qinwei Zhu, Jiunwei Chen, Visual Programming. [[3]]