12

Client and server

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Client and server
Page 2: Client and server

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

Page 3: Client and server

Client side scripting and Server side scripting

[email protected] Alitwitter.com/usernamein.linkedin.com/in/

profilename9037896770

Page 4: Client and server

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?

Page 5: Client and server

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

Page 6: Client and server

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

Page 7: Client and server

Scripting Languages

Page 8: Client and server

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

Page 9: Client and server

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.

Page 10: Client and 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>

Page 11: Client and server

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

Page 12: Client and server

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: [email protected]