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?
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.
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.