Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Introduction to

Scripting Languages Lab

School of Computer Science & Engineering


K L E Technological University, Hubballi – 31

1
Outline
•Scripting language.
•Characteristics of Scripting Languages
•Translation Process of Program
•Applications of scripting.

Dept. of CSE, BVBCET Hubballi-31 2


Scripting language
•Traditional programming languages are
concerned with building a self contained
environment that receives input and produces
output.
•Most ``real-world’’ computing however
involves the use of multiple programs.
•Definition: A scripting language is a
programming language designed for
integrating and communicating with other
programming languages.
•Designed to support “quick programming”.
•Most widely used scripting languages are :
JavaScript, VBScript, PHP, Perl, Python,
Ruby, Shell Script Etc.
Characteristics of Scripting Languages
•They are weakly typed.
–The meaning of information is inferred
–Don’t have to declare variables
–Manages the types of variables without the
programmer’s explicit input on matters of length and
type declarations.
•Interpreted (no compilation step)
•High-level model of underlying machine
•Garbage collected (Free space)
i.e. Automatic memory management controls the
allocation and freeing of memory on demand.

5
Translation Process of Program
Source Source Source

Interpreter Compiler
Compiler

Executable Execution Byte Code

Interpreter
Run

Execution Execution

Compiled Interpreter Byte Code


Execution Execution Execution

6
Continued …
•Ex : Python uses combination of compilation and
interpretation:
–The source code is converted to an intermediate form
called byte code in a step similar to compilation.
–The byte code is executed by an interpreter.
–This improves performance over purely interpreted
systems.
•Non-scripted languages like C and C++ are compiled into
“Raw Machine Code" (RMC).

•The interpreter itself is typically written in a language that


is itself compiled to RMC. The interpreter's task is to read
the scripted language, and translate that into operations done
by RMC.
7
Applications of scripting
•To develop web-based applications.
•Interfacing between a database and web server.
•To Develop custom commands for a shell commands.
•To design GUI for computers.
•Develop many complex applications like Computer
games, Simulations models etc.
•To automate the regular administrative functionalities
in the system like network management.
•To process big log files. ( Ex: Text processing)
•Interface to the underlying operating system.

You might also like