0% found this document useful (0 votes)
26 views7 pages

Class-7-Introduction To PHP Scripting-Server and Client Side XAMPP CSS HTML JavaScript SCripting Languages

The document discusses scripts and the differences between client-side and server-side scripting. Client-side scripts run on the browser and are visible to users, while server-side scripts run on the server and cannot be seen by users. Some common client-side scripting languages are HTML, CSS, JavaScript, while common server-side languages include PHP, Python, Ruby.

Uploaded by

lakshmiskumar25
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
0% found this document useful (0 votes)
26 views7 pages

Class-7-Introduction To PHP Scripting-Server and Client Side XAMPP CSS HTML JavaScript SCripting Languages

The document discusses scripts and the differences between client-side and server-side scripting. Client-side scripts run on the browser and are visible to users, while server-side scripts run on the server and cannot be seen by users. Some common client-side scripting languages are HTML, CSS, JavaScript, while common server-side languages include PHP, Python, Ruby.

Uploaded by

lakshmiskumar25
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 7

SCRIPT

A script is generally a series of program or instruction, which has to be executed on other


program or application. As we know that the web works in a client-server environment. The
client-side script executes the code to the client side which is visible to the users while a server-
side script is executed in the server end which users cannot see.

Difference Between Server-side Scripting and Client-side Scripting

Th
e scripts can be written in two forms, at the server end (back end) or at the client end (front end).
The main difference between server-side scripting and client-side scripting is that the server side
scripting involves server for its processing. On the other hand, client-side scripting requires
browsers to run the scripts on the client machine but does not interact with the server while
processing the client-side scripts.

Comparison Chart
Basis for
Server-side scripting Client-side scripting
comparison
Basic Works in the back end which could Works at the front end and script
not be visible at the client end. are visible among the users.
Processing Requires server interaction. Does not need interaction with the
server.
Languages PHP, ASP.net, Ruby on Rails, HTML, CSS, JavaScript, etc.
involved ColdFusion, Python, etc.
Affect Could effectively customize the web Can reduce the load to the server.
pages and provide dynamic websites.
Security Relatively secure. Insecure

Server-side scripting : 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 before
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.

Client-side Scripting :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.
The effective client-side scripting can significantly reduce the server load. It is designed to run
as a scripting language utilizing a web browser as a host program. For example, when a user
makes a request via browser for a webpage to the server, it just sent the HTML and CSS as plain
text, and the browser software in the client’s computer interprets and displays the web content on
the client’s computer.
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.

Key Differences Between Server-side Scripting and Client-side Scripting

1. Server-side scripting is used at the backend, where the source code is not viewable or
hidden at the client side (browser). On the other hand, client-side scripting is used at the
front end which users can see from the browser.
2. When a server-side script is processed it communicates to the server. As against, client-side
scripting does not need any server interaction.
3. The client-side scripting language involves languages such as HTML, CSS and JavaScript.
In contrast, programming languages such as PHP, ASP.net, Ruby, ColdFusion, Python, C#,
Java, C++, etc.
4. Server-side scripting is useful in customizing the web pages and implements the dynamic
changes in the websites. Conversely, the client-side script can effectively minimize the load
to the server.
5. Server-side scripting is more secure than client-side scripting as the server side scripts are
usually hidden from the client end, while a client-side script is visible to the users.
Conclusion
Client-side scripting and server-side scripting works in a coordinated manner with each other.
However, both the scripting techniques are very different, where the client-side scripting
emphasize on making the interface of the web application or website more appealing and
functional. Conversely, server-side scripting emphasizes on the data accessing methods, error
handling and fast processing etc.

Model Questions.

What is a script ? What is Client-side script and server-side script.


Give the full form of CGI. Explain CGI.
Give examples for Client-side scripting languages.
Give examples for Server-side scripting languages.
Who developed HTML?. Prepare a short note on the developer of HTML.
CSS : CASCADING STYLE SHEET
CSS is used to control the style of a web document in a simple and easy way.
CSS is the acronym for "Cascading Style Sheet".
Using CSS, you can control the color of the text, the style of fonts, the spacing between
paragraphs, how columns are sized and laid out, what background images or colors are used,
layout designs, variations in display for different devices and screen sizes as well as a variety of
other effects.
CSS is easy to learn and understand but it provides powerful control over the presentation of an
HTML document. Most commonly, CSS is combined with the markup languages HTML or
XHTML.
Advantages of CSS
 CSS saves time − You can write CSS once and then reuse same sheet in multiple HTML
pages. You can define a style for each HTML element and apply it to as many Web pages
as you want.
 Pages load faster − If you are using CSS, you do not need to write HTML tag attributes
every time. Just write one CSS rule of a tag and apply it to all the occurrences of that tag.
So less code means faster download times.
 Easy maintenance − To make a global change, simply change the style, and all elements
in all the web pages will be updated automatically.
 Superior styles to HTML − CSS has a much wider array of attributes than HTML, so
you can give a far better look to your HTML page in comparison to HTML attributes.
 Multiple Device Compatibility − Style sheets allow content to be optimized for more
than one type of device. By using the same HTML document, different versions of a
website can be presented for handheld devices such as PDAs and cell phones or for
printing.
 Global web standards − Now HTML attributes are being deprecated and it is being
recommended to use CSS. So its a good idea to start using CSS in all the HTML pages to
make them compatible to future browsers.

XAMPP
XAMPP is an open source software developed by Apache friends. The use of XAMPP is to test
the client’s website (ie. a site developed in the developer’s computer) before uploading it to the
remote web server. XAMPP server software gives the suitable environment for testing MYSQL,
PHP, Apache and Perl projects on the local computer.
XAMPP stands for Cross-Platform (X), Apache (A), MySQL (M), PHP (P) and Perl (P).
It is a simple, lightweight Apache distribution that makes it extremely easy for developers to
create a local web server for testing purposes. Everything you need to set up a web server –
server application (Apache), database (MySQL), and scripting language (PHP) – is included in a
simple extractable file.
XAMPP is also cross-platform, which means it works equally well on Linux, Mac and Windows.
Since most actual web server deployments use the same components as XAMPP, it makes
transitioning from a local test server to a live server is extremely easy as well. Web development
using XAMPP is especially beginner friendly.
What’s Included in XAMPP?
XAMPP has four primary components. These are:

1. Apache: Apache is the actual web server application that processes and delivers web content
to a computer. Apache is the most popular web server online, powering more than 60% of all
websites.

Apache is an open-source and free web server software. The official name is Apache HTTP
Server, and it’s maintained and developed by the Apache Software Foundation.

When someone wants to visit a website, they enter a domain name into the address bar of their
browser. Then, the web server delivers the requested files by acting as a virtual delivery man.

What is a Web Server?


File servers, database servers, mail servers, and web servers use different kinds of server
software. Each of these applications can access files stored on a physical server and use them for
various purposes.

The job of a web server is to serve websites on the internet. To achieve that goal, it acts as a
middleman between the server machines and client machines. It pulls content from the server on
each user request and delivers it to the web.

How Does Apache Web Server Work?


Although we call Apache a web server, it is not a physical server, but rather a software that runs
on a server.
Its job is to establish a connection between a server and the browsers of website visitors
(Firefox, Google Chrome, Safari, etc.) while delivering files back and forth between them
(client-server structure).
Apache is a cross-platform software, therefore it works on both Unix and Windows servers.

2. MySQL: Every web application, howsoever simple or complicated, requires a database for
storing collected data. MySQL, which is open source, is the world’s most popular database
management system. It powers everything from hobbyist websites to professional platforms like
WordPress (Content Management System).

3. PHP: PHP stands for Hypertext Preprocessor. It is a server-side scripting language that
powers some of the most popular websites in the world, including WordPress and Facebook. It is
open source, relatively easy to learn, and works perfectly with MySQL, making it a popular
choice for web developers.

4. Perl: Perl is a, general-purpose high-level programming language originally developed for text
manipulation and now used for a wide range of tasks including system administration, web
development, network programming, GUI development, and more.
HTML
HTML is not a programming language. HTML was invented by Tim Berners-Lee. He came
up with the idea of an Internet-based hypertext system.
Hypertext means a text that contains references (links) to other texts that viewers can access
immediately.
HTML documents are files that end with a .html or .htm extension. You can view then using
any web browser (such as Google Chrome, Safari, or Mozilla Firefox). The browser reads the
HTML file and renders its content so that internet users can view it.
Each HTML page consists of a set of tags (also called elements), which you can refer to as
the building blocks of web pages. They create a hierarchy that structures the content into
sections, paragraphs, headings, and other content blocks.
Most HTML elements have an opening and a closing that use the <tag></tag> syntax.
Below, you can see a code example of how HTML elements can be structured:
<div>
<h1>The Main Heading</h1>
<h2>A catchy subheading</h2>
<p>Paragraph one</p>
<img src="/" alt="Image">
<p>Paragraph two with a <a href="https://example.com">hyperlink</a></p>
</div>
The outmost element is a simple division (<div></div>) you can use to mark up bigger
content sections.
It contains a heading (<h1></h1>), a subheading (<h2></h2>), two paragraphs
(<p></p>), and an image (<img>).
The second paragraph includes a hyperlink (<a></a>) with a href attribute that contains the
destination URL.
The image tag also has two attributes: src for the image path and alt for the image
description.
Overviewing The Most Used HTML Tags
HTML tags have two main types: block-level and inline tags.
Block-level elements take up the full available space and always start a new line in the
document. Headings and paragraphs are a great example of block tags.
Inline elements only take up as much space as they need and don’t start a new line on the
page. They usually serve to format the inner contents of block-level elements. Links and
emphasized strings are good examples of inline tags.
Block-Level Tags
The three block level tags every HTML document needs to contain are <html>, <head>,
and <body>.
The <html></html> tag is the highest level element that encloses every HTML page.
The <head></head> tag holds meta information such as the page’s title and charset.
Finally, the <body></body> tag encloses all the content that appears on the page.
<html>
<head>
<!-- META INFORMATION -->
</head>
<body>
<!-- PAGE CONTENT -->
</body>
</html>
Headings have 6 levels in HTML. They range from <h1></h1> to <h6></h6>, where h1 is
the highest level heading and h6 is the lowest one. Paragraphs are enclosed by <p></p>,
while blockquotes use the <blockquote></blockquote> tag.
Divisions are bigger content sections that typically contain several paragraphs, images,
sometimes blockquotes, and other smaller elements. We can mark them up using
the <div></div> tag. A div element can contain another div tag inside it as well.
You may also use <ol></ol> tags for ordered lists and <ul></ul> for unordered ones.
Individual list items must be enclosed by the <li></li> tag. For example, this is how a basic
unordered list looks like in HTML:
<ul>
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
</ul>

How are HTML, CSS, and JavaScript related?


While HTML is a powerful language, it isn’t enough to build a professional and fully
responsive website. We can only use it to add text elements and create the structure of the
content.
However, HTML works extremely well with two other frontend languages: CSS (Cascading
Style Sheets), and PHP or JavaScript. Together, they can achieve rich user experience and
implement advanced functions.
CSS is responsible for stylings such as background, colors, layouts, spacing, and animations.
JavaScript lets you add dynamic functionality such as sliders, pop-ups, and photo galleries.

You might also like