Client and server

Preview:

DESCRIPTION

 

Citation preview

Disclaimer: This presentation is prepared by trainees of baabtra as a part of mentoring program. This is not official document of baabtra –Mentoring PartnerBaabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt . Ltd

Client side scripting and Server side scripting

Sarbazali.Nsarbazalin@gmail.comSarbaz Alitwitter.com/usernamein.linkedin.com/in/

profilename9037896770

Its a technique used in web development, which involves embedding scripts in an HTML source code, which results in a user's (client's) request to the server website being handled by a script running server-side, before the server responds to the client's request.

What is server side scripting?

A ‘Simple’ Web Request

:Web

Browser

ÀWeb

Server

1 - Request an HTML Page

4 - Present HTML Content

2 - Retrieve requested HTML

3 - Return HTML to Browser

HTML

Static and Dynamic Web Pages

• The facebook homepage could be considered static because it has a fixed layout and content. It does not change.

• After Login results page however is dynamic. This means its content can be changed.

• The only practical way to create this page is by using a script, otherwise facebook would have to create a static results page in advance for every single possible search.

• The user never sees the work a script does, only the end result it send back to their web browser.

Dynam

ic WebPage

Static WebPage

Scripting Languages

Client-Side Scripting

• Script is interpreted by browser and action occurs on browser

• Types of client-side scripting include– Javascript: runs on Chrom or IE etc.– VBScript: runs only on IE

Applications of Client-Side Scripting

• Web page responds to or reacts directly with user interaction through HTML Form elements.

eg:- input fields, text areas, buttons, radio buttons, etc.• You need to control the Web page appearance based on

user selections• You want to preprocess data before submission to the

server.

A JavaScript Example

Display Date and Time…..<!DOCTYPE html><html><head><script>function displayDate(){document.getElementById("demo").innerHTML=Date();}</script></head><body>

<h1>My First JavaScript</h1><p id="demo">This is a paragraph.</p>

<button type="button" onclick="displayDate()">Display Date</button>

</body></html>

If this presentation helped you, please visit our page facebook.com/baabtra and like it.

Thanks in advance.

www.baabtra.com | www.massbaab.com |www.baabte.com

Contact Us

Emarald Mall (Big Bazar Building)Mavoor Road, Kozhikode,Kerala, India.Ph: + 91 – 495 40 25 550

NC Complex, Near Bus StandMukkam, Kozhikode,Kerala, India.Ph: + 91 – 495 40 25 550

Start up VillageEranakulam,Kerala, India.

Email: info@baabtra.com

Recommended