Programming Languages

Lesson Objectives


The primary objective of this lesson is to provide you with fundamental information about the spectrum of available programming languages, especially types and levels of languages. This information should help you to understand just where the QBASIC language fits into this spectrum and how it relates to the other languages. At the end of this lesson, you will be able to:
  • list and describe the three major programming language levels
  • define the terms compiler and interpreter
  • list at least five high-level programming languages

Introduction

The material on this Web page is intended as a brief overview of programming languages and programming language levels. It should provide you with some insight as to where QBASIC came from, and where it fits in the spectrum of modern programming languages. In addition to the material on this Web page, you are encouraged to search the WWW for additional information about programming languages, their history and development, and QBASIC in particualr. A few WWW links related to these topics are included at the end of this page.

Programming Language Levels

A programming language is used by a human programmer to direct a computer to accomplish a specific set of steps which lead to a desired outcome.

The figure at right is intended to illustrate several key points about programming languages. First, programming languages are built upon and relate directly to the underlying computer (hardware). In fact, they are designed to control the operation of the hardware. Second, these programming languages can be divided into three major groups. They are:

  • machine
  • assembly
  • high-level

Machine language is the "native tongue" of the computer, the language closest to the hardware itself. Each unique computer has a unique machine language. A machine language program is made up of a series of binary patterns (e.g., 01011100) which represent simple operations that can be accomplished by the computer (e.g., add two operands, move data to a memory location). Machine language programs are executable, meaning that they can be run directly. Programming in machine language requires memorization of the binary codes and can be difficult for the human programmer.

Assembly language represents an effort to make programming easier for the human. The machine language instructions are replaced with simple pneumonic abbreviations (e.g., ADD, MOV). Thus assembly languages are unique to a specific computer (machine). Prior to execution, an assembly language program requires translation to machine language. This translation is accomplished by a computer program known as an Assembler. Assemblers are written for each unique machine language.

High-level languages are more English-like and, therefore, make it easier for programmers to "think" in the programming language. High-level languages also require translation to machine language before execution. This translation is accomplished by either a compiler or an interpreter. Compilers translate the entire source code program before execution. Interpreters translate source code programs one line at a time. Interpreters are more interactive than compilers.

Note:
This course deals with the high-level language known as BASIC. In particular, this course uses one of the Microsoft versions of BASIC, QBASIC.

Object-Oriented Programming

Object-oriented programming (OOP) is revolutionary concept that has changed the rules in computer program development. OOP is organized around objects rather than actions, data rather than logic. Historically, a program has been viewed as a logical procedure that takes input data, processes it, and produces output data. The programming challenge was seen as how to write the logic, not how to define the data. Object-oriented programming takes the view that what we really care about are the objects we want to manipulate rather than the logic required to manipulate them. Examples of objects range from human beings (described by name, address, and so forth) to buildings and floors (whose properties can be described and managed) down to the little widgets on your computer desktop (such as buttons and scroll bars).

The first step in OOP is to identify all the objects you want to manipulate and how they relate to each other, an exercise often known as data modeling. Once you have identified an object, you generalize it as a class of objects (think of Plato's concept of the "ideal" chair that stands for all chairs) and define the kind of data it contains and any logic sequences that can manipulate it. The logic sequences are known as methods. A real instance of a class is called (no surprise here) an "object" or, in some environments, an "instance of a class." The object or class instance is what you run in the computer. Its methods provide computer instructions and the class object characteristics provide relevant data. You communicate with objects - and they communicate with each other - with well-defined interfaces called messages.

The concepts and rules used in object-oriented programming provide these important benefits:

  • The concept of a data class makes it possible to define subclasses of data objects that share some or all of the main class characteristics. Called inheritance, this property of OOP forces a more thorough data analysis, reduces development time, and ensures more accurate coding.
  • Since a class defines only the data it needs to be concerned with, when an instance of that class (an object) is run, the code will not be able to accidentally access other program data. This characteristic of data hiding provides greater system security and avoids unintended data corruption.
  • The definition of a class is reuseable not only by the program for which it is initially created but also by other object-oriented programs (and, for this reason, can be more easily distributed for use in networks).
  • The concept of data classes allows a programmer to create new data types that are not defined in the language itself.
One of the first object-oriented computer languages was called Smalltalk. C++, Java Visual Basic are the most popular object-oriented languages today.

Rapid Application Development

A programming system that enables programmers to quickly build working programs. In general, RAD systems provide a number of tools to help build graphical user interfaces (GUIs) that would normally take a large development effort. Two of the most popular RAD systems for Windows are Visual Basic and Delphi (Pascal-based).

Historically, RAD systems have tended to emphasize reducing development time, sometimes at the expense of generating efficient executable code. Nowadays, though, many RAD systems produce extremely fast code. Conversely, many traditional programming environments now come with a number of visual tools to aid development. Therefore, the line between RAD systems and other development environments has become blurred.

Visual Programming

Visual programming refers to any system that allows the user to specify a program in two (or more) dimensions. Conventional textual languages are not considered two dimensional since the compilers or interpreters process them as long, one-dimensional streams. Visual Programming includes graphical programming languages using conventional flow charts to create programs. It does not include systems that use conventional (linear) programming languages to define pictures, such as Sketchpad, CORE, Phigs, Postscript, the Mac Toolbox, or the X-11 Window Manager toolkit.

A Visual Language manipulates visual information OR supports visual interaction, OR allows programming with visual expressions. The latter is taken to be the definition of a visual programming language. Visual programming languages may be further classified according to the type and extent of visual expression used, into icon-based languages, form-based languages and diagram languages.

Visual programming environments provide graphical or iconic elements which can be manipulated by the user in an interactive way according to some specific spatial grammar for program construction.

Visually transformed languages are inherently non-visual languages but have superimposed visual representations. Naturally visual languages have an inherent visual expression for which there is no obvious textual equivalent.

It is often difficult to separate a visual language from its language environment. It is the high degree of integration between the language and its environment that makes naturally visual language technology so influential in language environment research.

Visual Basic

Visual Basic is a programming environment from Microsoft in which a programmer uses a graphical user interface to choose and modify preselected chunks of code written in the BASIC programming language.

Since Visual Basic is easy to learn and fast to write code with, it's sometimes used to prototype an application that will later be written in a more difficult but efficient language. Visual Basic is also widely used to write working programs. Microsoft says that there are at least 3 million developers using Visual Basic.

 

    Click on the button at left to return to the calling page.

 

There have been visitors since 11/26/2003

Added to the Web: December 30, 1999.

Web page design by Dan Solarek.


http://cset.sp.utoledo.edu/engt1050/