IT3401 WEB ESSENTIALS
UNIT 1
SCRIPTING LANGUAGE
Definition of Scripting Language:
A scripting language is a programming language designed for integrating and communicating
with other programming languages. Some of the most widely used scripting languages are
HTML, JavaScript, VBScript, PHP, Perl, Python, Ruby, and ASP and so on
In general, scripting languages are easier to learn and faster to code in more structured and
compiled languages such as C and C++. Scripting languages are useful tools for developing
interactive web pages with minimum efforts. Scripting Languages are often interpreted (rather
than compiled). The scripting languages are useful for producing dynamic web contents. That
means web page can be changed using user input.
Advantages of Scripting Languages:
Scripting languages are easy to learn.
It requires minimum programming knowledge or experience to develop the web pages
using scripting languages.
The scripting languages allow simple creation and editing in variety of text editors.
Using scripting languages we can develop dynamic and interactive web pages.
There are some scripting languages that validate the information entered by the user.
Types of Scripting Languages
There are two types of scripting languages-Client side scripting language and server side
scripting language.
Server Side Scripting
Server side scripting is used to create web pages that provide some services. These scripts
generally run on web servers. For example: ASP, JSP, Servlet, PHP
Server side scripting pages
Server-side scripting is a technique of programming for producing the code which can run
software on the server side, in simple words any scripting or programming that can run on the
web server is known as server-side scripting. The operations like customization of a website,
dynamic change in the website content, response generation to the user's queries, accessing the
database, and so on are performed at the server end. The server-side scripting constructs a
communication link between a server and a client (user). Earlier the server side scripting is
implemented by the CGI (Common Gateway Interface) scripts. The CGI was devised to execute
the scripts from programming languages such as C++ or Perl on the websites.
The server-side involves three parts: server, database, API's and back-end web software
developed by the server-side scripting language. When a browser sends a request to the server
for a webpage consisting of server-side scripting, the web server processes the script prior to
serving the page to the browser. Here the processing of a script could include extracting
information from a database, making simple calculations, or choosing the appropriate content
that is to be displayed in the client end. The script is being processed and the output is sent to the
browser. The web server abstracts the scripts from the end user until serving the content, which
makes the data and source code more secure.
Server-side scripting languages
After the advent of CGI, multiple programming languages were evolved such as PHP, Python,
Ruby, ColdFusion, C#, Java, C++ and so on for server-side scripting among which some of them
are described below:
PHP: It is the most prevalent server-side language used on the web which was designed to
extract and manipulate information in the database. The language is used in association with
SQL language for the Database. It is used in Facebook, WordPress and Wikipedia.
Python: The language is fast and contains shorter code. It is good for beginners as it concentrates
on the readability and simplicity of the code. Python functions well in the object-oriented
environment and used in famous sites like Youtube, Google, etc.
Ruby: It contains complex logic which packages the back-end with database utility which can
also be provided by PHP and SQL.
1. It helps work with the back end.
2. It doesn't depend on the client.
3. It runs on the web server.
4. It helps provide a response to every request that comes in from the user/client.
5. This is not visible to the client side of the application.
6. It requires the interaction with the server for the data to be process.
7. Server side scripting requires languages such as PHP, [Link], ColdFusion, Python,
Ruby on Rails.
8. It is considered to be a secure way of working with applications.
9. It can be used to customize web pages.
10. It can also be used to provide dynamic websites.
Client-Side Scripting
The client side scripting is used to create the web pages as a request or response to server. These
pages are displayed to the user on web browser. For example: HTML, CSS, JavaScript, PHP
Client-side scripting is performed to generate a code that can run on the client end (browser)
without needing the server side processing. Basically, these types of scripts are placed inside an
HTML document. The client-side scripting can be used to examine the user's form for the errors
before submitting it and for changing the content according to the user input. As I mentioned
before, the web requires three elements for its functioning which are, client, database and server.
The effective client-side scripting can significantly reduce the server load.
designed to run as a scripting language utilizing a web browser as a host program. F example,
when a user makes a request via browser for a webpage to the server, it ju sent the HTML and
CSS as plain text, and the browser interprets and renders the we content in the client end.
Client-side scripting languages:
HTML: It is the fundamental building blocks of web programming which provides the frame to
the website. It describes the arrangement of the content.
CSS: CSS provides the way to design the graphic elements which help in making the appearance
of the web application more attractive.
JavaScript: It is also a client-side scripting language which essentially devised for the specific
purpose, but currently there are various JavaScript frameworks used as server-side scripting
technology.
1. It helps work with the front end.
2. It is visible to the users.
3. The scripts are run on the client browser.
4. It runs on the user/client's computer.
5. It depends on the browser's version.
6. It doesn't interact with the server to process data.
7. Client side scripting involves languages such as HTML, CSS, JavaScript.
8. It helps reduce the load on the server.
9. It is considered to be less secure in comparison to client side scripting.
What is a script?
Script is a small, embedded program. The most popular scripting languages on the web are,
JavaScript or [Link] does not have scripting capability, you need to use <script>tag.
The <script> tag is used to generate a script. The </script> tag indicates the end of the script or
program.