web server scripting 2

20
Unit 27 – Web Server Scripting BTEC Level 3 90-Credit Diploma for IT Users Lecturer: Owen Funnell

Upload: owen-funnell

Post on 19-Jun-2015

750 views

Category:

Technology


0 download

DESCRIPTION

WSS Ass.1 Pres 1

TRANSCRIPT

Page 1: Web server scripting 2

Unit 27 – Web Server Scripting

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

Page 2: Web server scripting 2

This Lesson….

• Recap - What is server side scripting? What is a static/dynamic Webpage

• The processes involved in hosting, serving and rendering web content

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

Page 3: Web server scripting 2

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 4: Web server scripting 2

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

How Does server side scripting?

Page 5: Web server scripting 2

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

Server Side Vs 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 6: Web server scripting 2

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

Server Side Vs Client Side

Page 7: Web server scripting 2

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

Server Side Vs Client Side

A. Browser sends request to the server

B. Server checks the file and processes the embedded scripts

C. Server gathers final formatted document

D. The browser displays the document

A

Web Server with PHP

B

DC

Page 8: Web server scripting 2

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

Server Side Vs Client Side

Page 9: Web server scripting 2

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 10: Web server scripting 2

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

Client side and Server SideClient 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

Page 11: Web server scripting 2

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

Web Server Scripting Languages

ASPJSPPHP

Cold FusionPerl

Ruby on RailsDjango

Page 12: Web server scripting 2

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

Web Server Scripting LanguagesShopping cart Reserve order

Manage user profileWeb content management

Upload filesWebsite analysis

Page 13: Web server scripting 2

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

Compiled and Interpreted Languages:Compiled

Scenario: 2 Computers – Computer 1 has written a programme for computer 2 to run. Computer 1 writes it source code and compiles it

The end result is a executable file which computer 2 can run

Page 14: Web server scripting 2

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

Compiled and Interpreted Languages:Interpreted

Same Scenario: 2 Computers – Computer 1 has written a programme for computer 2 to run. As it is an interpreted code all computer one does is hand computer 2 a copy. Its does not compile it into a executable file

Computer 2 must interpret the code and run the programme. The code is run on the fly

Page 15: Web server scripting 2

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 usersBecause 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 16: Web server scripting 2

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 DevelopmentDevelopment is simpler, generally only an editor and an FTPapplication 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 17: Web server scripting 2

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 DevelopmentYou 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

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

Page 18: Web server scripting 2

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

Web Server Scripting Disadvantages

Complex debuggingDebugging 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 HackersScripts 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 19: Web server scripting 2

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 fileDatabase SupportMost 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

Page 20: Web server scripting 2

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

Accessibility

Aiding the user experience • Alternative text• Resizable fonts• Support for screen readers• Adjustable fonts.

he Government. In the UK two pieces of legislation have recently been introduced, The Disabilities Discrimination Act (DDA) and the Special Educational Needs and Disabilities Act (SENDA), both of which are designed to ensure institutions take accessibility seriously.

Web authorities. The World Wide Web Consortium (W3C), the body responsible for setting the standards that web designers should adhere to, have created the Web Accessibility Initiative (WAI) a set of standards to be met that should ensure accessible websites

http://www.abilitynet.org.uk/