BlogsDope image BlogsDope

Scripting Language

July 23, 2020 JAVASCRIPT 12020

In this tutorial, we are going to learn about scripting languages. There are many types of programming languages, for example, logic programming, procedural programming language, etc. A scripting language is also a type of programming language. So, all scripting languages are programming languages, but not all programming languages are scripting languages.

So, what is a scripting language?

A scripting language, or a script language, is used for a specific run time environment, and they automate some of the tasks. In a scripting language, the code gets executed without having any need for compilation, i.e., they are interpreted. To understand this clearly, let’s see what the difference between a compiler and an interpreter is. A compiler is a computer program that converts the complete source code written in a high-level language that is understandable by humans, into machine code that is understandable by computers, before the execution of a program. However, an interpreter is a program that converts each statement into machine code, while a program is running. The compiler takes a lot of time while analyzing the program. Therefore, if there is any error, then the compiler throws it, and the compilation fails. The program will not execute at all. If you have worked with any scripting language, for example, JavaScript or Python, you might have noticed that if your code contains an error in a line, then before that line, all the statements get executed. However, in a compiling language, like C or Java, none of the statements run.

Scripting language

So now we know what a scripting language is. Let’s go further and see its types.

Types of scripting language


There are two types of scripting languages.

Server-side scripting language

A scripting language that runs on a web server is a server-side scripting language. It is used at the back end, and the script is not visible to the user. Therefore, it is secure. It is generally used to create dynamic websites, send responses to user queries, or provide data, etc.

Examples of server-side languages include Python, PHP, Perl, Ruby, etc.

Client-side scripting language

A scripting language that runs on the user’s web browser is a client-side scripting language. It is used at the front end, and thus, the script is visible to the user, which makes it less secure. It is used to create a user interface and related functionality. Client-side scripting is faster because it does not require interaction with the web server.

Examples of client-side languages include HTML, CSS, and JavaScript.

Advantages of Scripting Languages


  • There are many advantages of using a scripting language. First, they are open source. Therefore, anyone around the world can use it and contribute to it.
  • Second, if you are a beginner, they are a great way to start with programming languages, as they are quite easy to learn and code.
  • As we know that most scripting languages use an interpreter, and unlike compilers, no executable file is stored, and hence, they require less memory.
  • They are portable, i.e., can run on different operating systems.
  • Scripts are also used as a prototype before building an actual program.

Disadvantages of Scripting languages


  • The interpreter is slower than the compiler because it converts each statement to the machine code during execution. However, the compiling languages get converted into machine code beforehand.
  • In the scripting languages, the interpreter analyzes each statement line by line during execution, therefore don’t perform many optimizations to execute the code faster.

Application of Scripting languages


Scripting languages are vastly used in web development. It helps to make complex web pages and applications with simplicity. As explained above, both the server and client sides of a web application are coded using scripting languages. They are used in system administration, for example, shells for operating systems. They are also used in embedded systems, in the making of extensions, plugins, and games, etc.


Liked the post?
A computer science student having interest in web development. Well versed in Object Oriented Concepts, and its implementation in various projects. Strong grasp of various data structures and algorithms. Excellent problem solving skills.
Editor's Picks
0 COMMENT

Please login to view or add comment(s).