A visual programming language (VPL), also known as a visual programming system (VPS), diagrammatic programming, graphical programming, or block coding, is a programming language that allows users to create programs by manipulating program elements graphically rather than by specifying them textually. A VPL enables programming through visual expressions and the spatial arrangement of text and graphic symbols, which are used either as elements of syntax or as secondary notation.
Definition and characteristics
Many VPLs are based on the "boxes and arrows" concept, in which boxes or other screen objects represent entities that are connected by arrows, lines, or arcs representing relations. VPLs can be classified according to the type and extent of visual expression used, including icon-based languages, form-based languages, and diagram languages. Visual programming environments provide graphical or iconic elements that users can manipulate interactively according to a specific spatial grammar for program construction.
The general goal of VPLs is to make programming more accessible to novices. They aim to support programmers at three levels: syntax (using icons, blocks, forms, and diagrams to reduce or eliminate syntactic errors), semantics (providing mechanisms to disclose the meaning of programming primitives), and pragmatics (allowing users to place artifacts into particular states to observe program behavior).
Types of visual programming
Visual programming languages may incorporate elements from multiple paradigms, including:
- Block-based programming (e.g., Scratch, Blockly), often used in educational settings
- Flowcharts, used in software engineering and systems design
- Drag-and-drop interfaces, commonly used in GUI design tools
- Node graphs, used in visual programming, game development, and dataflow systems
- Dataflow programming, used in parallel computing, signal processing, and visual programming environments
- State machines, used in game development and control systems
- Sheet-based, timeline-based, spatial, and form-based programming approaches
Examples of visual programming languages
Notable examples include Scratch (a product of MIT designed for K-12 education), Snap! (an extension of Scratch), Alice (used to program 3D environments), LabVIEW (a graphical language for engineers and scientists), Simulink (a graphical environment for modeling and simulating multidomain dynamical systems), Max (used for interactive music and multimedia applications), Pure Data (for interactive computer music and multimedia), Node-RED, and Unreal Engine's Blueprints (a node-based visual programming language). VPLs are also generally the basis of low-code development platforms.
Relationship to visual IDEs
Languages such as Visual Basic, Visual C#, and Visual J# of the Microsoft Visual Studio integrated development environment are not visual programming languages, despite their names. In these cases, the representation of algorithms remains textual even though the IDE enhances editing and debugging with a rich graphical user interface. A similar consideration applies to most rapid application development environments, which typically support a form designer and may include graphical tools to illustrate, but not define, control flow and data dependencies.
Technical foundations
Parsers for visual programming languages can be implemented using graph grammars. As of the early 2000s, ongoing development sought to integrate visual programming approaches with dataflow programming languages to provide immediate access to program state, online debugging, and automatic program generation and documentation. Dataflow languages also allow automatic parallelization.
General-purpose visual languages
Most VPLs are designed for education or domain-specific usage targeting novice programmers. However, some research projects have attempted to create general-purpose visual programming languages usable by mainstream programmers in any software project, including projects such as PWCT and Envision.