Presentation is loading. Please wait.

Presentation is loading. Please wait.

What is it? –Large Web sites that support commercial use cannot be written by hand What you’re going to learn –How a Web server and a database can be used.

Similar presentations


Presentation on theme: "What is it? –Large Web sites that support commercial use cannot be written by hand What you’re going to learn –How a Web server and a database can be used."— Presentation transcript:

1 What is it? –Large Web sites that support commercial use cannot be written by hand What you’re going to learn –How a Web server and a database can be used to generate web pages from data. –Some systems that provide the necessary functionality –How a simple example looks in code. Web sites based on data

2 Web Client / userWeb Server Database server 1. User requests a page 3. SQL query 4. Server executes query data returned 5. Server script copies data in HTML format Web page on screen The “three tier architecture” 2. HTTP request sent Response Runs program or script

3 Some technologies to use Web Client / userWeb ServerDatabase server Any Web browser Apache (most popular) Server language: PHP MySQL Query language: SQL Bundled in the package Client languages: HTML, CSS, JavaScript

4 In practice: code http://www.boisvert.me.uk/run/elcid.html? file=users/charles/PHP_and_MySQL.xml (http://localhost/run/elcid.html?file=users/charles/PHP_and_MySQL.xml)http://localhost/run/elcid.html?file=users/charles/PHP_and_MySQL.xml … PHP and MySQL databases <?php $con = mysql_connect(“hostname","user","password"); mysql_select_db(“databasename", $con); ?> The lines in red are server commands, Embedded in the HTML code.

5 Web sites based on data What is it? –Large Web sites that support commercial use are written by programming the Web server to generate pages from database data What you’ve learnt –The three-tier architecture supports data- oriented web sites –The open-source XAMPP package contains the necessary software –PHP server scripting is embedded within HTML code to program the system.


Download ppt "What is it? –Large Web sites that support commercial use cannot be written by hand What you’re going to learn –How a Web server and a database can be used."

Similar presentations


Ads by Google