All Topics  
Scripting language

 

   Email Print
   Bookmark   Link






 

Scripting language



 
 
A scripting language, script language or extension language, is a programming language
Programming language

A programming language is a machine-readable artificial language designed to express computations that can be performed by a machine, particularly a computer....
 that allows some control of a single or many software application(s)
Application software

Application software is any tool that functions and is operated by means of a computer, with the purpose of supporting or improving the software user 's work....
. "Scripts" are often treated as distinct from "programs
Computer program

Computer programs are Instruction for a computer. A computer requires programs to function. Moreover, a computer program does not run unless its instructions are executed by a Central processing unit; however, a program may communicate an Algorithm#Formalization of algorithms to people without running....
", which execute independently from any other application. At the same time they are distinct from the core code of the application, which is usually written in a different language, and by being accessible to the end-user
End-user

Economics and commerce define an end-user as the person who uses a Product . The end-user or consumer may differ from the person who purchases the product....
 they enable the behavior of the application to be adapted to the user's needs.






Discussion
Ask a question about 'Scripting language'
Start a new discussion about 'Scripting language'
Answer questions from other users
Full Discussion Forum



Encyclopedia


A scripting language, script language or extension language, is a programming language
Programming language

A programming language is a machine-readable artificial language designed to express computations that can be performed by a machine, particularly a computer....
 that allows some control of a single or many software application(s)
Application software

Application software is any tool that functions and is operated by means of a computer, with the purpose of supporting or improving the software user 's work....
. "Scripts" are often treated as distinct from "programs
Computer program

Computer programs are Instruction for a computer. A computer requires programs to function. Moreover, a computer program does not run unless its instructions are executed by a Central processing unit; however, a program may communicate an Algorithm#Formalization of algorithms to people without running....
", which execute independently from any other application. At the same time they are distinct from the core code of the application, which is usually written in a different language, and by being accessible to the end-user
End-user

Economics and commerce define an end-user as the person who uses a Product . The end-user or consumer may differ from the person who purchases the product....
 they enable the behavior of the application to be adapted to the user's needs. Scripts are often, but not always, interpreted from the source code or "semi-compiled" to bytecode
Bytecode

Bytecode is a term which has been used to denote various forms of instruction sets designed for efficient execution by a software Interpreter as well as being suitable for further compilation into machine language....
 which is interpreted, unlike the applications they are associated with, which are traditionally compiled
Compiler

A compiler is a computer program that transforms source code written in a programming language into another computer language . The most common reason for wanting to transform source code is to create an executable program....
 to native machine code for the system on which they run. Scripting languages are nearly always embedded in the application with which they are associated.

The name "script" is derived from the written script of the performing arts
Performing arts

The performing arts are those forms of art which differ from the plastic arts insofar as the former uses the artist's own body, face and presence as a medium, and the latter uses materials such as clay, metal or paint which can be molded or transformed to create some physical work of art....
, in which dialogue is set down to be spoken by human actors. Early script languages were often called batch languages or job control languages. Such early scripting languages were created to shorten the traditional edit-compile
Compiler

A compiler is a computer program that transforms source code written in a programming language into another computer language . The most common reason for wanting to transform source code is to create an executable program....
-link
Linker

In computer science, a linker or link editor is a computer program that takes one ormore object file generated by a compiler and combines them into a single executable program....
-run process.

Historical overview

The first interactive shell
Shell (computing)

In computing, a shell is a piece of software that provides an Interface for users. Typically, the term refers to an operating system shell which provides access to the services of a kernel ....
s were developed in the 1960s to enable remote operation of the first time-sharing
Time-sharing

Time-sharing refers to sharing a computing resource among many users by Computer multitasking. Its introduction in the 1960s, and emergence as the prominent model of computing in the 1970s, represents a major historical shift in the history of computing....
 systems, and these generated a demand for scripting, to relieve the human operator of the tedium of re-entering sequences of commands at a computer terminal
Computer terminal

A computer terminal is an electronic or electromechanical computer hardware device that is used for entering data into, and displaying data from, a computer or a computing system....
 keyboard, so from there were developed simple macro commands, files containing sequences of commands, which eventually developed into shell script
Shell script

A shell script is a Scripting language written for the Shell , or command line interpreter, of an operating system. It is often considered a simple domain-specific programming language....
s. In a parallel development, the larger and more complex applications developed embedded scripting facilities, at first very rudimentary, to facilitate batch mode
Batch processing

Batch processing is execution of a series of Computer programs on a computer without human interaction.Batch jobs are set up so they can be run to completion without human interaction, so all input data is preselected through Script s or command-line parameters....
 operation where a human operator would not be present to guide the program. Thus part of the program was devoted to interpreting instructions written by the user in a (usually quite specialized) instruction language — a computer program within a computer program.

Historically, there was a clear distinction between "real" high speed programs written in languages such as C, and simple, slow scripts written in languages such as Bourne Shell or Awk. But as technology improved, the performance differences shrank and interpreted languages like Java, Lisp, Perl and Python emerged and gained in popularity to the point where they are considered general-purpose programming languages and not just languages that "drive" an interpreter.

Languages such as Tcl
Tcl

Tcl is a scripting language created by John Ousterhout. Originally "born out of frustration"?according to the author?with programmers devising their own languages intended to be embedded into applications, Tcl quickly gained wide acceptance on its own and is generally thought to be easy to learn, but powerful in competent hands....
 and Lua, were specifically designed as general purpose scripting languages that could be embedded in any application or used on their own. Other systems such as Visual Basic for Applications
Visual Basic for Applications

Visual Basic for Applications is an implementation of Microsoft Event-driven programming programming language Visual Basic, and associated integrated development environment , which is built into most Microsoft Office applications....
 (VBA) provided strong integration with the automation facilities of an underlying system. Embedding of such general purpose scripting languages instead of developing a new language for each application also had obvious benefits, relieving the application developer of the need to code a language translator from scratch and allowing the user to apply skills learned elsewhere.

Early web server
Web server

The term web server can mean one of two things:# A computer program that is responsible for accepting Hypertext Transfer Protocol requests from clients , and Server them HTTP responses along with optional data contents, which usually are web pages such as Hypertext Markup Language documents and linked objects ....
s used scripting languages via the Common Gateway Interface
Common Gateway Interface

The Common Gateway Interface is a Standardization Protocol for interfacing external application software with an Server , commonly a web server....
, ASP
Active Server Pages

Active Server Pages , also known as Classic ASP, was Microsoft's first server-side scripting Active Scripting for dynamic web page. Initially released as an add-on to Internet Information Services via the Windows_NT_4.0#Option_Pack, it was subsequently included as a free component of Windows Server ....
, or PHP
PHP

PHP is a scripting language originally designed for producing dynamic web pages. It has evolved to include a command line interface capability and can be used in Standalone software Graphical user interface....
. But most larger applications are now written in Java (JSP
JavaServer Pages

JavaServer Pages is a Java technology that allows software developers to create dynamic web page, with HTML, XML, or other document types, in response to a Web client request....
), Coldfusion, PHP or .Net
.NET Framework

The Microsoft .NET Framework is a software framework that is available with several Microsoft Windows operating systems. It includes a large Library of coded solutions to prevent common programming problems and a virtual machine that manages the execution of programs written specifically for the Software framework....
.

Some software incorporates several different scripting languages. Modern web browser
Web browser

A Web browser is a application software which enables a user to display and interact with text, images, videos, music, games and other information typically located on a Web page at a website on the World Wide Web or a local area network....
s typically provide a language for writing extensions to the browser itself, and several standard embedded languages for controlling the browser, including ECMAScript
ECMAScript

ECMAScript is a scripting language, standardized by Ecma International in the ECMA-262 Specification . The language is widely used on the World Wide Web, and is often confused with JavaScript or JScript, the two major Programming language dialect from which ECMAScript was standardized....
 (more commonly known as JavaScript
JavaScript

JavaScript is a scripting language widely used for client-side web development. It was the originating Programming language dialect of the ECMAScript standard....
), CSS
Cascading Style Sheets

Cascading Style Sheets is a stylesheet language used to describe the presentation of a document written in a markup language. Its most common application is to style web pages written in HTML and XHTML, but the language can be applied to any kind of XML document, including Scalable Vector Graphics and XUL....
, and HTML
HTML

HTML, an Acronym and initialism of HyperText Markup Language, is the predominant markup language for Web pages. It provides a means to describe the structure of text-based information in a document?by denoting certain text as links, headings, paragraphs, lists, and so on?and to supplement that text with interactive forms, embedded '...
.

Types of scripting languages


Job control languages and shells


A major class of scripting languages has grown out of the automation of job control, which relates to starting and controlling the behavior of system programs. (In this sense, one might think of shells as being descendants of IBM's JCL, or Job Control Language
Job Control Language

Job Control Language is a scripting language used on IBM mainframe operating systems to instruct the system on how to run a batch processing or start a subsystem....
, which was used for exactly this purpose.) Many of these languages' interpreters double as command-line interpreters such as the Unix shell
Unix shell

A Unix shell is a command-line interpreter and script host that provides a traditional user interface for the Unix operating system and for Unix-like systems....
 or the MS-DOS COMMAND.COM
COMMAND.COM

COMMAND.COM is the filename of the default operating system Shell for DOS operating systems and the default command line interpreter on 16/32-bit versions of Microsoft Windows ....
. Others, such as AppleScript
AppleScript

AppleScript is a scripting language devised by Apple Inc., and built into Mac OS. More generally, "AppleScript" is the word used to designate the Mac OS scripting interface, which is meant to operate in parallel with the graphical user interface....
, add scripting capability to computing environments lacking a command-line interface.

GUI Scripting

With the advent of graphical user interface
Graphical user interface

A graphical user interface is a type of user interface which allows people to human-computer interaction such as computers; hand-held devices such as MP3 Players, Portable Media Players or Gaming devices; household appliances and office equipment....
s came a specialized kind of scripting language for controlling a computer. These languages interact with the same graphic windows, menus, buttons, and so on that a system generates. These languages are typically used to automate repetitive actions or configure a standard state. In principle they could be used to control any application running on a GUI-based computer; but, in practice, the support for such languages depends on the application and operating system
Operating system

An operating system is an interface between hardware and applications; it is responsible for the management and coordination of activities and the sharing of the limited resources of the computer....
. Such languages are also called "macros" when control is through simulated key presses or mouse clicks.

Application-specific languages

Many large application programs include an idiomatic scripting language tailored to the needs of the application user. Likewise, many computer game systems use a custom scripting language to express the programmed actions of non-player character
Non-player character

A non-player character, often shortened to NPC, is a fictional character that is controlled by the gamemaster in role-playing games. When this definition extends to video games, an NPC in a video game is usually part of the computer program, and not controlled by a human....
s and the game environment. Languages of this sort are designed for a single application; and, while they may superficially resemble a specific general-purpose language (e.g. QuakeC
QuakeC

QuakeC is an interpreted programming language developed in 1996 by John D. Carmack of id Software to program parts of the computer game Quake....
, modeled after C), they have custom features that distinguish them. Emacs Lisp
Emacs Lisp

Emacs Lisp is a dialect of the Lisp programming language used by the GNU Emacs and XEmacs text editors . It is used for implementing most of the editing functionality built into Emacs, the remainder being written in C ....
, while a fully formed and capable dialect of Lisp, contains many special features that make it most useful for extending the editing functions of Emacs. An application-specific scripting language can be viewed as a domain-specific programming language
Domain-specific programming language

In software development, a domain-specific language is a programming language or specification language dedicated to a particular problem domain, a particular problem representation technique, and/or a particular solution technique....
 specialized to a single application.

Web browsers

Web browsers are typically used to render HTML
HTML

HTML, an Acronym and initialism of HyperText Markup Language, is the predominant markup language for Web pages. It provides a means to describe the structure of text-based information in a document?by denoting certain text as links, headings, paragraphs, lists, and so on?and to supplement that text with interactive forms, embedded '...
, but in time a host of special-purpose languages has developed to control their operation. These include ECMAScript
ECMAScript

ECMAScript is a scripting language, standardized by Ecma International in the ECMA-262 Specification . The language is widely used on the World Wide Web, and is often confused with JavaScript or JScript, the two major Programming language dialect from which ECMAScript was standardized....
, a very versatile procedural
Procedural programming

Procedural programming can sometimes be used as a synonym for imperative programming , but can also refer to a programming paradigm based upon the concept of the procedure call....
 scripting language superficially resembling Java
Java (programming language)

Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java ....
; Cascading Style Sheets
Cascading Style Sheets

Cascading Style Sheets is a stylesheet language used to describe the presentation of a document written in a markup language. Its most common application is to style web pages written in HTML and XHTML, but the language can be applied to any kind of XML document, including Scalable Vector Graphics and XUL....
, which enable style metadata to be abstracted from content; XML which can be used for content in conjunction with style metadata, as an alternative to HTML
HTML

HTML, an Acronym and initialism of HyperText Markup Language, is the predominant markup language for Web pages. It provides a means to describe the structure of text-based information in a document?by denoting certain text as links, headings, paragraphs, lists, and so on?and to supplement that text with interactive forms, embedded '...
; VBScript
VBScript

VBScript is an Active Scripting language, developed by Microsoft, which uses the Component Object Model to access elements of the environment within which it's running ....
 by Microsoft
Microsoft

Microsoft Corporation is a multinational corporation computer technology corporation that develops, manufactures, licenses, and supports a wide range of computer software products for computing devices....
, which only works in Internet Explorer
Internet Explorer

Windows Internet Explorer , commonly abbreviated to IE, is a series of graphical user interface web browsers developed by Microsoft and included as part of the Microsoft Windows line of operating systems starting in 1995....
; and XSLT
XSL Transformations

Extensible Stylesheet Language Transformations is an XML-based language used for the XML transformation language into other XML or "human-readable" documents....
, a presentation language that transforms XML content into a new form. Techniques involving the combination of XML and JavaScript scripting to improve the user's subjective impression of responsiveness have become significant enough to acquire a name: AJAX
Ajax (programming)

Ajax, or AJAX , is a group of interrelated web development techniques used to create interactive web applications or rich Internet applications....
. The Document Object Model
Document Object Model

The Document Object Model is a platform- and programming language-independent standard object model for representing HTML or XML documents as well as an Application Programming Interface for querying, traversing and manipulating such documents....
 standard ensures that all browsers respond in a predictable manner to the same JavaScript.

The Mozilla
Mozilla

Mozilla was the official, public, original name of Mozilla Application Suite by the Mozilla Foundation, currently known as SeaMonkey internet suite....
 project has developed its own system for extending the user interface of the browser itself, called XUL
XUL

XUL , the XML User Interface Language, is an XML user interface markup language developed by the Mozilla project which operates in Mozilla cross-platform applications such as Mozilla Firefox and Flock ....
.

Web servers

On the server side of the HTTP link, application server
Application server

An application server, in an Multitier architecture, is a server that hosts an Application programming interface to expose business logic and business processes for use by third-party Business software....
s and other dynamic content servers such as Web content management system
Web content management system

A web content management system is content management system software, usually implemented as a Web application, for creating and managing HTML content....
s provide content through a large variety of techniques and technologies typified by the scripting approach. Particularly prominent in this area are PHP
PHP

PHP is a scripting language originally designed for producing dynamic web pages. It has evolved to include a command line interface capability and can be used in Standalone software Graphical user interface....
, ColdFusion
ColdFusion

ColdFusion is an application server and software language used for Internet application development such as for dynamic web page. In this regard, ColdFusion is a similar product to Microsoft Active Server Pages, JavaServer Pages or PHP....
, JSP and ASP
Active Server Pages

Active Server Pages , also known as Classic ASP, was Microsoft's first server-side scripting Active Scripting for dynamic web page. Initially released as an add-on to Internet Information Services via the Windows_NT_4.0#Option_Pack, it was subsequently included as a free component of Windows Server ....
, but other developments such as Ruby on Rails
Ruby on Rails

Ruby on Rails is an open source web application framework for the Ruby . It is often referred to as "Rails" or "RoR". It is intended to be used with an agile software development, which is often utilized by web developers for its suitability for short, client-driven projects....
 have carved out a niche.

Text processing languages

The processing of text-based records is one of the oldest uses of scripting languages. Many, such as Unix
Unix

Unix is a computer operating system originally developed in 1969 by a group of American Telephone & Telegraph employees at Bell Labs, including Ken Thompson , Dennis Ritchie, Douglas McIlroy, and Joe Ossanna....
's AWK, sed
Sed

sed is a Unix utility which parses text files and implements a programming language which can apply textual transformations to such files. It reads input files line by line , applying the operation which has been specified via the command line , and then outputs the line....
, and grep
Grep

grep is a command line interface text search utility originally written for Unix. The name is taken from the first letters in global / regular expression / print, a series of instructions for the ed text editor....
 were originally designed to aid programmers in automating tasks that involved Unix text-based configuration and log files. Of primary importance here is the regular expression
Regular expression

In computing, regular expressions provide a concise and flexible means for identifying strings of text of interest, such as particular characters, words, or patterns of characters....
, a language developed for the formal description of the lexical structure of text, and used by all of these tools.

Perl
Perl

In computer programming, Perl is a high-level programming language, List of programming languages by category, Interpreter , dynamic programming language....
 was originally designed to overcome the limitations of these tools and has grown to be one of the most widespread general purpose languages.

General-purpose dynamic languages

Some languages, such as Perl, began as scripting languages but were developed into programming languages suitable for broader purposes. Other similar languages – frequently interpreted, memory-managed, or dynamic – have been described as "scripting languages" for these similarities, even if they are more commonly used for applications programming. They are usually not called "scripting languages" by their own users.

Extension/embeddable languages

A number of languages have been designed for the purpose of replacing application-specific scripting languages by being embeddable in application programs. The application programmer (working in C or another systems language) includes "hooks" where the scripting language can control the application. These languages serve the same purpose as application-specific extension languages but with the advantage of allowing some transfer of skills from application to application. JavaScript began as and primarily still is a language for scripting inside web browser
Web browser

A Web browser is a application software which enables a user to display and interact with text, images, videos, music, games and other information typically located on a Web page at a website on the World Wide Web or a local area network....
s; however, the standardization of the language as ECMAScript
ECMAScript

ECMAScript is a scripting language, standardized by Ecma International in the ECMA-262 Specification . The language is widely used on the World Wide Web, and is often confused with JavaScript or JScript, the two major Programming language dialect from which ECMAScript was standardized....
 has made it popular as a general purpose embeddable language. In particular, the Mozilla
Mozilla

Mozilla was the official, public, original name of Mozilla Application Suite by the Mozilla Foundation, currently known as SeaMonkey internet suite....
 implementation SpiderMonkey is embedded in several environments such as the Yahoo! Widget Engine
Yahoo! Widget Engine

Yahoo! Widgets is a free application platform for Mac OS X and Microsoft Windows. The software was previously called Konfabulator, but after being acquired by computer services company Yahoo! it was rebranded....
. Other applications embedding ECMAScript implementations include the Adobe
Adobe Systems

Adobe Systems Incorporated is an United States computer Computer software company headquartered in San Jose, California, USA. The company has historically focused upon the creation of multimedia and creativity software products, with a more-recent foray into rich Internet application software development....
 products Adobe Flash
Adobe Flash

Adobe Flash is a multimedia Platform created by Macromedia and currently developed and distributed by Adobe Systems. Since its introduction in 1996, Flash has become a popular method for adding animation and interactivity to web pages; Flash is commonly used to create animation, advertisements, and various web page components, to integrate...
 (ActionScript
ActionScript

ActionScript is a scripting language based on ECMAScript. ActionScript is used primarily for the development of websites and software using the Adobe Flash Player platform , but is also used in some database applications , and in basic robotics, as with the Make Controller Kit....
) and Adobe Acrobat
Adobe Acrobat

Adobe Acrobat is a family of software developed by Adobe Systems, designed to view, create, manipulate and manage files in Adobe's Portable Document Format ....
 (for scripting PDF files).

Tcl
Tcl

Tcl is a scripting language created by John Ousterhout. Originally "born out of frustration"?according to the author?with programmers devising their own languages intended to be embedded into applications, Tcl quickly gained wide acceptance on its own and is generally thought to be easy to learn, but powerful in competent hands....
 was created as an extension language but has come to be used more frequently as a general purpose language in roles similar to Python
Python (programming language)

Python is a general-purpose high-level programming language. Its design philosophy emphasizes code readability. Python's core syntax and semantics are Minimalism , while the standard library is large and comprehensive....
, Perl
Perl

In computer programming, Perl is a high-level programming language, List of programming languages by category, Interpreter , dynamic programming language....
, and Ruby
Ruby (programming language)

Ruby is a dynamic programming language, reflection , general purpose object-oriented programming language that combines syntax inspired by Perl with Smalltalk-like features....
.

Market analysis

The most popular scripting language, as of 2008, is JavaScript
JavaScript

JavaScript is a scripting language widely used for client-side web development. It was the originating Programming language dialect of the ECMAScript standard....
. The second most popular is PHP
PHP

PHP is a scripting language originally designed for producing dynamic web pages. It has evolved to include a command line interface capability and can be used in Standalone software Graphical user interface....
. Perl
Perl

In computer programming, Perl is a high-level programming language, List of programming languages by category, Interpreter , dynamic programming language....
 is the third most popular scripting language, but in North America
North America

North America is the northern continent of the Americas, situated in the Earth's northern hemisphere and almost totally in the western hemisphere....
 it enjoys significantly more popularity.

See also

  • Architecture description language
    Architecture description language

    Different communities use the term architecture description language. Two important communities are:* The software engineering community* The enterprise modelling and engineering community...
  • Build automation
    Build Automation

    Build automation is the act of Scripting language or automating a wide variety of tasks that a software developer will do in their day-to-day activities including things like:...
  • Domain-specific language
  • Glue code
    Glue code

    In programming, glue code is code that does not contribute any functionality towards meeting the program's Requirements, but instead serves solely to "glue together" different parts of code that would not otherwise be compatible....
  • Interpreted language
    Interpreted language

    In computer programming an interpreted language is a programming language whose implementation often takes the form of an interpreter . Theoretically, any language may be compiler or interpreted, so this designation is applied purely because of common implementation practice and not some underlying property of a language....
  • List of programming languages
    List of programming languages

    There are thousands of computer programming programming languages. These are listed in various ways:*Timeline of programming languages*List of programming languages by category – by general usage and context...
  • Macro and preprocessor
    Preprocessor

    In computer science, a preprocessor is a Computer program that processes its input data to produce output that is used as input to another program....
     languages
  • Ousterhout's dichotomy
    Ousterhout's dichotomy

    Ousterhout's dichotomy is John Ousterhout's claim that high-level languages tend to fall into two groups, each with distinct properties and uses: "system programming languages" and "scripting languages"....
  • Programming in the large and programming in the small
  • Shebang (Unix)
    Shebang (Unix)

    In computing, a shebang refers to the characters "#!" when they are the first two characters in a script file. Unix-like operating systems take the presence of these two characters as an indication that the file is a script, and try to execute that script using the interpreter specified by the rest of the first line in the file....
  • Shell script
    Shell script

    A shell script is a Scripting language written for the Shell , or command line interpreter, of an operating system. It is often considered a simple domain-specific programming language....
  • Shell (computing)
    Shell (computing)

    In computing, a shell is a piece of software that provides an Interface for users. Typically, the term refers to an operating system shell which provides access to the services of a kernel ....
  • System programming
    System programming

    System programming is the activity of programming system software. The primary distinguishing characteristic of systems programming when compared to application programming is that application programming aims to produce software which provides services to the user , whereas systems programming aims to produce software which provides service...
  • Web template languages
    Web template

    A web template is a tool used to Separation of concerns content from presentation in web design, and for mass-production of web documents. It is a basic component of a web template system....


External links

  • — from The Scriptometer
  • by Dr. Nikolai Bezroukov
  • — Administrative scripting related information (includes examples)
  • — 2003 study
  • by John K. Ousterhout
  • ] by Ronald Loui
    Ronald Loui

    Ronald Prescott Loui is an American computer scientist and philosopher. He got his B.A. from Harvard in 1982 and his Ph.D. in Computer Science and Philosophy from the University of Rochester in 1987....
  • — JavaWorld