Download pptx - Server side scripting

Transcript
Page 1: Server side scripting
Page 2: Server side scripting

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

What is server side scripting? Different programming languages used in server side scripting

Niyaz

[email protected]

tweetboy

niyazsky

9746049 048

in/niyazsky

Page 4: 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

Page 5: Server side scripting

Static Web Pages

I n t e r n e t

1. Client requests page

2. Web server sends the HTML file to the client

Web Server

Client Machine With Web Browser

• A simple website is made up of one or more static HTML files. This means the page content does not change.

• The only way to update a page is for the author to edit the file.

• This is fine for small websites or those that require little updating.

• Static pages will not work for websites that need to deliver lots of custom and up-to-date content. Examples of these sites are:

• Shopping / auctions

• Discussion forums

• Search engines

• Online banking

• Blogs

• Web-based email

Page 6: Server side scripting

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

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

How Scripting Languages Work

I n t e r n e t

Client requests page

Completed HTML sent to client

Web Server

Client Machine With Web Browser

• The script, written by the website developer, generates the HTML code of the page requested.

• The HTML is not actually a file. The code is actually held in the server’s memory until it is sent directly to the client.

• A script may run other scripts, depending on its function. It will however still only give one end result.

• A website does not have to be completely made up of either scripts or HTML files. It can use a combination of the two.z

<HTML>

Script buildsHTML code

HTML ready to send

Server runs script

[ ASP / PHP / Ruby ]Script

HTML Code

Page 9: Server side scripting

• A script creates what appears to be a static web page using content generated or read from a data source.

• There are many scripting languages, made by different companies and organisations.

• The current most popular are ASP, PHP and Ruby on Rails.• All are very powerful and work in slightly different ways.• It does not matter what scripting language a website uses because there

are no compatibility issues with clients’ web browsers.• The client only ever sees the final HTML generated by the script and not

the script itself.• Scripts often finish running in several milliseconds. Most web servers can

run many scripts simultaneously with a minimal performance hit.

Scripting Languages

Page 10: Server side scripting

scripting languages with extension

ASP (*.asp)ASP.NET (*.aspx)C via CGI (*.c, *.csp)ColdFusion Markup Language (*.cfm)Java via JavaServer Pages (*.jsp)JavaScript using Server-side JavaScript (*.ssjs, *.js)Lua (*.lp *.op)Perl CGI (*.cgi, *.ipl, *.pl)PHP (*.php) - Open Source ScriptingPython, e.g. via Django (*.py)Ruby, e.g. Ruby on Rails (*.rb, *.rbw)SMX (*.smx)Lasso (*.lasso)WebDNA (*.dna,*.tpl)Progress WebSpeed (*.r,*.w)

Page 11: Server side scripting

HISTORY• Server-side scripting was first used in early

1995 by Fred DuFresne while developing the first web site for Boston, MA television station WCVB.

• In the earlier days of the web, server-side scripting was almost exclusively performed by using a combination of C programs, Perl scripts, and shell scripts using the Common Gateway Interface(CGI). Those scripts were executed by the operating system.

• Many modern web servers can directly execute on-line scripting languages such as ASP and PHP either by the web server itself or via extension modules (e.g. mod_perl or mod_php) to the web server.

Page 12: Server side scripting

QUESTIONS SECTION

Page 13: Server side scripting

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

Contact Us


Recommended