Unit:6 Server-Side Scripting and Client-Side Scripting (Web Technology I Second Year First Parts in IT Engineering )
Server-side Scripting and Client-side Scripting
The scripts may be created in two ways: on the client side or the server side, where the server-side scripts are processed on a server. In contrast, client-side scripting needs browsers to execute scripts on the client system but doesn't connect with the server executing the client-side scripts.
What is Server-side Scripting?
Server-side scripting is a programming technique for creating code that may run software on the server side. In other words, server-side scripting is any scripting method that may operate on a web server. At the server end, actions such as website customization, dynamic changes in website content, response creation to user requests, database access, and many more are carried out. www.bibekoo.com
Server-side scripting languages
There are various server-side scripting languages. Some
main server-side scripting languages are as follows:
Python
It is an open-source language that is very powerful and easy
to learn. It is suitable for beginners because it is simple to learn and read.
It is believed to be used by Google and YouTube. It is a OOPs language with
dynamic typing and data structures. It has grown to be one of the most popular
languages for both quick application development and web development.
PHP
It is an open-source server-side scripting programming language mainly designed for web apps and is the most utilized scripting language. It allows you to retrieve and manipulate data from a database and is utilized along with SQL to query the database. It is a fast and simple language to learn and develop, and Facebook, Wikipedia, and WordPress utilize it.
Ruby
It is a free and open-source programming language that was
developed and firstly introduced in the early 1990s. It is a dynamic language
that is simple to read and write and an OOPs language that is interpreted as it
runs. It has evolved continuously since its development and is one of the most
utilized web development languages.
Features of Server-side Scripting
There are various features of server-side scripting. Some main features of the server-side scripting are as follows:
1.It is connected with data access, error handling, and data processing speed.
2.It is processed and interacts with the server.
3.Using a highly integrated programming language makes it more secure than client-side scripting.
Advantages and disadvantages of server-side scripts
Advantages
• User can create one template for the entire website
•The site can use a content management system which makes editing simpler.
• Generally quicker to load than client-side scripting
•User is able to include external files to save coding.
•Scripts are hidden from view so it is more secure. Users only see the HTML output.
•User does not need to download plugins like Java or Flash.
Disadvantages
• Many scripts and content management systems tools require databases in order to store dynamic data.
•It requires the scripting software to be installed on the server.
•The nature of dynamic scripts creates new security concerns, in some cases making it easier for hackers to gain access to servers exploiting code flaws.
What is Client-side Scripting?
Client-side scripting generates code that may be executed on
the client end without needing server-side processing. These scripts are
typically embedded into HTML text. Client-side scripting may be utilized to
check the user's form for problems before submitting it and to change the
content based on the user input. The web needs three components to function:
client, database, and server.
The client-side scripting may significantly reduce server demand. It is intended to be utilized as a scripting language with a web browser as the host program. The HTML and CSS are delivered as plain text when a user uses a browser to request a webpage from the server, and the browser understands and renders the web content at the client end.
Client-side Scripting Languages
There are various client-side scripting languages. Some
main client-side scripting languages are as follows:
HTML
It is not a scripting language; it is a markup language.
However, it serves as the basic language for client-side web development, also
referred to as front-end. The presence of hypertext on a page denotes its
hyperlinks. The markup language uses tags to define the structure and layout.
It is a programming language that is mainly used to design a web page's
structure and layout.
CSS
CSS is an abbreviation for Cascading Style Sheets. It
provides a technique for creating graphic elements that help a web
application's appearance look more appealing. A style tag in a web page defines
all the specifics regarding the web page's presentation, including its border
styles, image styles, colour, font styles, borders, format, font size, margins,
padding, etc.
JavaScript
It is a client-side scripting language designed for a
specific purpose, but several JavaScript frameworks are already utilized as
server-side scripting technologies.
VBScript
VBScript is based on Visual Basic, which was created by
Microsoft in 1996. It is a scripting programming language that is lightweight,
fast, and easy to learn. It is not a OOPs language but is similar to
JavaScript.
Features of Client-side Scripting
There are various features of client-side scripting. Some main features of the client-side scripting are as follows:
1.It is intended to execute code on which a web browser runs, and the results of the inputs are delivered to an accessible user.
2.Client-side scripting enables greater involvement with clients via the browser and is used to validate programs and functionality based on the request.
3.The client does not include any contact with the server in client-side scripting; the only interaction is receiving the requested data.
Advantages and disadvantages of client-side scripts
Developers might consider using client-side scripts for many reasons, and they might have some legitimate reasons not to use them.
Advantages
Client-side scripts offer numerous advantages, including:
• Allow for more interactivity by immediately responding to users’ actions.
• Execute quickly because they do not require a trip to the server.
• May improve the usability of Web sites for users whose browsers support scripts.
• Can give developers more control over the look and behaviour of their Web widgets.
• Can be substituted with alternatives (for example, HTML) if users’ browsers do not support scripts
•Are reusable and obtainable from many free resources.
Disadvantages
Client-side scripts also create additional worries which include:
•Not all browsers support scripts, therefore, users might experience errors if no alternatives have been provided.
•Different browsers and browser versions support scripts differently, thus more quality assurance testing is required.
•More development time and effort might be required (if the scripts are not already available through other resources).
•Developers have more control over the look and behaviour of their Web widgets; however, usability problems can arise if a Web widget looks like a standard control but behaves differently or vice-versa.
Difference between client-side scripting and server-side scripting:
Client-Side Scripting | Server-Side Scripting |
---|---|
Source code is visible to the user. | Source code is not visible to the user because its output of server-side side is an HTML page. |
Its main function is to provide the requested output to the end user. | Its primary function is to mainpulate and provide access to the respective database as per the request. |
It usually depends on the browser and its version. | In this any server-side technology can be used and it does not depend on the client. |
It runs on the user's computer. | It runs on the webserver. |
There are many advantages linked with this like faster.response times a more interactive application. | The primary advantage is its ability to highly customize ,response requirements,access rights based on user. |
It is a technique used in web development in which scripts run on the client's browser. | It is a technique that uses,scripts on the webserver to produce a response that is customized for each client's request. |
HTML,CSS,and JavaScript are used. | PHP,Python,Java,Ruby is used. |
It does not provide security for data. | It provides more security for data. |
No Need of interaction with the server. | It is all about interacting with the servers. |
It reduces load on processing unit of the server. | IT surges the processing load on the server. |
0 Comments