Introduction to PHP FdSc Module 109 Server side scripting and

Slides:



Advertisements
Similar presentations
PHP I.
Advertisements

PHP SQL. Connection code:- mysql_connect("server", "username", "password"); Connect to the Database Server with the authorised user and password. Eg $connect.
Welcome to Middleware Joseph Amrithraj
The Client-Server Model for the Web 1. A Web Client (usually in the form of a web browser) makes an HTTP request to a specific web server. 2. The Web Server.
1 Web Servers / Deployment Alastair Dawes Original by Bhupinder Reehal.
Technical Architectures
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.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic Server Side Web Technologies: Part 1.
CIS101 Introduction to Computing
Week 2 IBS 685. Static Page Architecture The user requests the page by typing a URL in a browser The Browser requests the page from the Web Server The.
Multiple Tiers in Action
IS4401 Project Technology Issues. Introduction This seminar covers Databases When to use a Database What Database to use Development Tools Visual Studio.
Apache Tomcat Server Typical html Request/Response cycle
Website Development with PHP and MySQL Introduction.
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
VMware vCenter Server Module 4.
PHP and MySQL Week#1  Course Plan.  Introduction to Dynamic Web Content.  Setting Up Development Server Eng. Mohamed Ahmed Black 1.
Copyright © Texas Education Agency, All rights reserved.1 Web Technologies Web Administration.

Copyright © cs-tutorial.com. Introduction to Web Development In 1990 and 1991,Tim Berners-Lee created the World Wide Web at the European Laboratory for.
Databases and the Internet. Lecture Objectives Databases and the Internet Characteristics and Benefits of Internet Server-Side vs. Client-Side Special.
11/16/2012ISC329 Isabelle Bichindaritz1 Web Database Application Development.
HTML. Principle of Programming  Interface with PC 2 English Japanese Chinese Machine Code Compiler / Interpreter C++ Perl Assembler Machine Code.
DEV-5: Introduction to WebSpeed ® Stephen Ferguson Sr. Training Program Manager.
SQL Queries Relational database and SQL MySQL LAMP SQL queries A MySQL Tutorial and applications Database Building.
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
Putting it all together Dynamic Data Base Access Norman White Stern School of Business.
Oracle 10g Database Administrator: Implementation and Administration Chapter 2 Tools and Architecture.
1 Welcome to CSC 301 Web Programming Charles Frank.
Web Design (1) Terminology. Coding ‘languages’ (1) HTML - Hypertext Markup Language - describes the content of a web page CSS - Cascading Style Sheets.
Dynamic web content HTTP and HTML: Berners-Lee’s Basics.
Case Study Dynamic Website - Three Tier Architecture
1 Session 1: Introduction to PHP & MySQL iNET Academy Open Source Web Development.
Distributed database system
PHP on a Fast Track a quick introduction to PHP programming by Jarek Francik last time updated in 2012.
IS-907 Java EE World Wide Web - Overview. World Wide Web - History Tim Berners-Lee, CERN, 1990 Enable researchers to share information: Remote Access.
WHAT IS SERVER SIDE SCRIPTING? Server-side scripting is a web server technology in which a user's request is verified by running a script directly on the.
PHP Introduction PHP is a server-side scripting language.
WEB SERVER SOFTWARE FEATURE SETS
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
Unit 1 – Web Concepts Instructor: Brent Presley.
8 th Semester, Batch 2009 Department Of Computer Science SSUET.
ASP.NET WEB Applications. ASP.NET  Web application framework developed by Microsoft  Build dynamic data driven web applications and web services  Subset.
9 Copyright © 2004, Oracle. All rights reserved. Getting Started with Oracle Migration Workbench.
PHP Basics and Syntax Lesson 3 ITBS2203 E-Commerce for IT.
Getting Started With HTML
Web Programming Language
Introduction to Dynamic Web Programming
ITM352 PHP and Dynamic Web Pages: Server Side Processing 1.
Web Concepts Lesson 2 ITBS2203 E-Commerce for IT.
Technologies and Applications
What is WWW? The term WWW refers to the World Wide Web or simply the Web. The World Wide Web consists of all the public Web sites connected to the Internet.
Introduction and Principles
Relational database and SQL MySQL LAMP SQL queries
SQL Queries Relational database and SQL MySQL LAMP SQL queries
XHTML Basics.
PHP / MySQL Introduction
Database Driven Websites
XHTML Basics.
XHTML Basics.
Web Browser server client 3-Tier Architecture Apache web server PHP
SEEM4570 Tutorial 07: Filezilla and PHP
PHP and Forms.
Web Servers / Deployment
Introduction of Week 11 Return assignment 9-1 Collect assignment 10-1
XHTML Basics.

XHTML Basics.
UFCEUS-20-2 Web Programming
Web Application Development Using PHP
Presentation transcript:

Introduction to PHP FdSc Module 109 Server side scripting and Database design 2014

Client server architecture http://www.webdevelopersnotes.com/basics/client_server_architecture.php3

Client server architecture Client server computing is: an environment which satisfies a business need by appropriately allocating the application processing between the client and server processors A client provides presentation services, computing power and connectivity A server provides computing, connectivity and database services

Client server architecture The protocol is that the Client requests a service from the server The server processes the request and returns the results to the client A server can service many clients at the same time and regulate their access to shared resources A server can reside on the same machine as the client, or on a different machine across a network

Client server architecture Ideal client server software is independent of hardware or operating systems Client server is scalable Extra clients can be added or removed with only slight performance impacts Servers can be migrated to bigger or multiple machines

Client server architecture Server code and data are centrally managed Cheaper maintenance Data integrity Secure access

Benefits Data is available to all authorised users Structured Query Language (SQL) allows access from all client processors and software Applications can be developed without regard to hardware platforms or technical characteristics of the software Systems using SQL are transparent to data storage location and technology

Benefits Applications can have a consistent look and feel Servers can be repaired, replaced, upgraded or relocated without the client being aware

Database software Comparison of industrial databases (and Access) Product Maximum Size Maximum Table size Maximum row size Maximum fields per row IBM DB2 512 TB 32 kB 1012 MS SQL 524 TB Unlimited 30k MySQL 265 TB 64 kB 4096 Oracle 4GB 8 kB 1000 MS Access 2 GB 16 MB 255

Server components http://www.frogcp.com/php-hosting-with-mysql

Components of a client server web based application Database and server Returns data when requested by SQL We will use MySQL Web server Serves web pages in HTML We use Apache Server side PHP interpreter Substitutes HTML for PHP scripts which can issue SQL and return data Client Your web browser of choice

College set up Each student has For home you can use XAMPP A folder for storing the web site MySQL PHP FTP access Apache For home you can use XAMPP

Tools Contextual editors FTP MySQL Notepad++ (Windows) GEDIT (Linux) PHPStorm IDE FTP Filezilla MySQL PHPMyAdmin

What is PHP? A server side language Scripts that allow you to control the content of web pages Unlike Javascript in the browser, which does the same job, PHP runs on the web server PHP scripts are embedded in HTML pages When the page is served, the PHP interpreter replaces the PHP with HTML, based on what the script tells it to do

Example XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xm<!DOCTYPE html PUBLIC "-//W3C//DTD lns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Today’s Date</title> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> </head> <body> <p>Today’s date (according to this web server) is <?php echo date('l, F dS Y.'); ?> </p> </body> </html>

What the browser shows Today’s date (according to this web server) is Saturday, January 28th 2012. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Today’s Date</title> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> </head> <body> <p>Today’s date (according to this web server) is Saturday, January 28th 2012. </p> </body> </html>

Advantages No browser incompatibility issues Browser only receives HTML Access to server side resources Databases Reduced load on client Java can significantly slow down browsers

Practicalities – method 1 Use an FTP client (I use Filezilla) to create a subdirectory on your student account Host is hosting.computing.hct.ac.uk User is your hosting: username Password is your hosting: password The web site is: hosting.computing.hct.ac.uk/username Use a contextual editor (Notepad++ or gedit to create the file we just used and save it with a file type of .php (I called it test1.php) in the subdirectory Access it using your browser Make sure it works

Practicalities – method 2 PHPStorm – connections Select Settings from the File menu Select Deployment

PHPStorm - connections Use these settings, replacing BDOCMS with your username Then select Advanced Options

PHPStorm - connections In advanced options select Passive Mode

PHPStorm - connections Select the Mappings tab and set up the local storage Test the connection then click OK

PHPStorm usage PHPStorm has a contextual editor working on local files and will automatically synch up to the host.