What is server side scripting? -...

14
BTEC Level 3 90-Credit Diploma for IT Users Lecturer: Owen Funnell Server-side scripting is a web server technology in which a user's request is verified by running a script directly on the web server to generate dynamic web pages. It is used to create dynamic web pages Unlike client side scripting, the code is secure as it cannot be viewed on the client What is server side scripting?

Transcript of What is server side scripting? -...

Page 1: What is server side scripting? - owenfunnell.co.ukowenfunnell.co.uk/web_docs/lvl3yr2/unit27/lessons/week1/Web Server...Unlike client side scripting, the code is secure as it cannot

BTEC Level 3 90-Credit Diploma for IT UsersLecturer: Owen Funnell

Server-side scripting is a web server technology in which a user's request is verified by running a script directly on the web server to generate dynamic web pages.

It is used to create dynamic web pages

Unlike client side scripting, the code is secure as it cannot be viewed on the client

What is server side scripting?

Page 2: What is server side scripting? - owenfunnell.co.ukowenfunnell.co.uk/web_docs/lvl3yr2/unit27/lessons/week1/Web Server...Unlike client side scripting, the code is secure as it cannot

BTEC Level 3 90-Credit Diploma for IT UsersLecturer: Owen Funnell

Client Side

A

A. Browser requests for a particular HTML file

B. The server locates the file and sends it to the browser

C. The browser displays the HTML file

Web Server

B

C

Page 3: What is server side scripting? - owenfunnell.co.ukowenfunnell.co.uk/web_docs/lvl3yr2/unit27/lessons/week1/Web Server...Unlike client side scripting, the code is secure as it cannot

BTEC Level 3 90-Credit Diploma for IT UsersLecturer: Owen Funnell

Client Side

Page 4: What is server side scripting? - owenfunnell.co.ukowenfunnell.co.uk/web_docs/lvl3yr2/unit27/lessons/week1/Web Server...Unlike client side scripting, the code is secure as it cannot

BTEC Level 3 90-Credit Diploma for IT UsersLecturer: Owen Funnell

Server SideA. Browser sends request to the server

B. Server checks the file and processes the

embedded scripts

C. Server gathers final formatted document.

Accessing stored files or databases for

information the user wants

D. The browser displays the document

A

Web Server with PHP

B

DC

Web Server Scripting

interacting with

technology such ass

MYSQL Databases

Page 5: What is server side scripting? - owenfunnell.co.ukowenfunnell.co.uk/web_docs/lvl3yr2/unit27/lessons/week1/Web Server...Unlike client side scripting, the code is secure as it cannot

BTEC Level 3 90-Credit Diploma for IT UsersLecturer: Owen Funnell

Server Side

Page 6: What is server side scripting? - owenfunnell.co.ukowenfunnell.co.uk/web_docs/lvl3yr2/unit27/lessons/week1/Web Server...Unlike client side scripting, the code is secure as it cannot

BTEC Level 3 90-Credit Diploma for IT UsersLecturer: Owen Funnell

What we will use for this unit

• Web server scripts written in PHP• Database commands written in SQL (structured

query language)• Client scripts written in JavaScript• Apache Web server • MySQL database managed with PHPMyAdmin• PHP interpreter add on to Apache

Page 7: What is server side scripting? - owenfunnell.co.ukowenfunnell.co.uk/web_docs/lvl3yr2/unit27/lessons/week1/Web Server...Unlike client side scripting, the code is secure as it cannot

BTEC Level 3 90-Credit Diploma for IT UsersLecturer: Owen Funnell

Client side and Server Side

Client side• Reduces web traffic as processing done on client• Good for:

• Form validation• User aids (drop downs, hover etc)• Local navigation

Server side• Can use centralised server resources eg databases• No client plug-ins required, runs in any browser• No load on client, can use powerful server hardware• Applications do not need distributing (Sending to the client only the content)

Page 8: What is server side scripting? - owenfunnell.co.ukowenfunnell.co.uk/web_docs/lvl3yr2/unit27/lessons/week1/Web Server...Unlike client side scripting, the code is secure as it cannot

BTEC Level 3 90-Credit Diploma for IT UsersLecturer: Owen Funnell

Web Server Scripting Languages

ASPJSPPHP

Cold FusionPerl

Ruby on RailsDjango

Page 9: What is server side scripting? - owenfunnell.co.ukowenfunnell.co.uk/web_docs/lvl3yr2/unit27/lessons/week1/Web Server...Unlike client side scripting, the code is secure as it cannot

BTEC Level 3 90-Credit Diploma for IT UsersLecturer: Owen Funnell

Web Server Scripting Languages

Shopping cart Reserve order

Manage user profileWeb content management

Upload filesWebsite analysis

Page 10: What is server side scripting? - owenfunnell.co.ukowenfunnell.co.uk/web_docs/lvl3yr2/unit27/lessons/week1/Web Server...Unlike client side scripting, the code is secure as it cannot

BTEC Level 3 90-Credit Diploma for IT UsersLecturer: Owen Funnell

Web Server Scripting Advantages

Server side scripting using simple interpreted scripts have several advantages over compiled high level languages and Client Languages

Easy for users

Because the processing of the page is done on the server side, the client is not required to support client side scripting, hence plugins like java and flash may not be required. Hence a wider audience can be reached

Easy for client machinesDue to replacing client side scripting with server side scripting the file size may be smaller and hence the load time maybe quicker, this depends on the processing time at the server end. So generally if the server is faster then there is a less load on the client computer and hence older client machine will function better and a greater audience will be reached.

Page 11: What is server side scripting? - owenfunnell.co.ukowenfunnell.co.uk/web_docs/lvl3yr2/unit27/lessons/week1/Web Server...Unlike client side scripting, the code is secure as it cannot

BTEC Level 3 90-Credit Diploma for IT UsersLecturer: Owen Funnell

Web Server Scripting Advantages

Server side scripting using simple interpreted scripts have several advantages over compiled high level languages and Client Languages

Extra Security

By pre-processing the web page the client only sees the output, the HTML. All processing scripts are hidden from the client.

Ease of Development

Development is simpler, generally only an editor and an FTP

application are required. If an error occurs just edit the file, upload and the job is complete, therefore:

• editing and deploying code is fast.

• allow simple creation and editing in a variety of text editors

Page 12: What is server side scripting? - owenfunnell.co.ukowenfunnell.co.uk/web_docs/lvl3yr2/unit27/lessons/week1/Web Server...Unlike client side scripting, the code is secure as it cannot

BTEC Level 3 90-Credit Diploma for IT UsersLecturer: Owen Funnell

Web Server Scripting Advantages

Server side scripting using simple interpreted scripts have several advantages over compiled high level languages and Client Languages

Quick and Easy Development

You can create a single website template for the entire website. Each new dynamic page you create will automatically use it.

You can configure a site to use a content management system, which

simplifies the editing, publishing, adding of images, and creation of web

applications. Many apps are often available in the form of extensions or

add-ons

Mobility

Can use basic, eg phone, browsers as processing is server side

Page 13: What is server side scripting? - owenfunnell.co.ukowenfunnell.co.uk/web_docs/lvl3yr2/unit27/lessons/week1/Web Server...Unlike client side scripting, the code is secure as it cannot

BTEC Level 3 90-Credit Diploma for IT UsersLecturer: Owen Funnell

Web Server Scripting Disadvantages

Complex debugging

Debugging can be difficult. With these simple development system the only way to test a script is on the server, which means that when things go wrong they go wrong on the server and there is normally very little feedback to the developer of what went wrong.

Scripts do have rudimentary debugging tools build in.

Exploited by Hackers

Scripts can be used by hackers to gain access to the server. Because the scripts respond to URL input, changing the URL and its data packets, to something that exploits a security hole can give the user, access to the server, sometimes even as the root account.

Web Server Script is commonly used to store user data, losing this data can mean breaking the law!

Page 14: What is server side scripting? - owenfunnell.co.ukowenfunnell.co.uk/web_docs/lvl3yr2/unit27/lessons/week1/Web Server...Unlike client side scripting, the code is secure as it cannot

BTEC Level 3 90-Credit Diploma for IT UsersLecturer: Owen Funnell

Web Server Scripting Disadvantages

Requires a server running additional software and additional setup

The server is required to run additional software and needs additional setup and configuration, such as configuring the php.ini file

Database Support

Most of the scripts and content management systems need databases in order to store the dynamic data. This adds additional difficulty when building a web server