Introduction to Web Programming SCSC Mentoring Special Class Made Harta Dwijaksara – 2014-06-24.

Slides:



Advertisements
Similar presentations
WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
Advertisements

HTTP Request/Response Process 1.Enter URL ( in your browser’s address bar. 2.Your browser uses DNS to look up IP address of server.com.
Project 1 Introduction to HTML.
Chapter Concepts Review Markup Languages
How Clients and Servers Work Together. Objectives Learn about the interaction of clients and servers Explore the features and functions of Web servers.
1st Project Introduction to HTML.
Chapter 14 Introduction to HTML
Web Programming Language Dr. Ken Cosh Week 1 (Introduction)
WHAT IS PHP PHP is an HTML-embedded scripting language primarily used for dynamic Web applications.
HTML 1 Introduction to HTML. 2 Objectives Describe the Internet and its associated key terms Describe the World Wide Web and its associated key terms.
Chapter ONE Introduction to HTML.
Linux Operations and Administration
1 Introduction to Web Development. Web Basics The Web consists of computers on the Internet connected to each other in a specific way Used in all levels.
Getting Started with Dreamweaver
INTRODUCTION TO WEB DATABASE PROGRAMMING
IT 210 The Internet & World Wide Web introduction.
Chapter 1 Introduction to HTML, XHTML, and CSS
What is Web Design?  Web design is the creation of a Web page using hypertext or hypermedia to be viewed on the World Wide Web.
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.
The Internet and the World Wide Web. The Internet A Network is a collection of computers and devices that are connected together. The Internet is a worldwide.
NASRULLAH KHAN.  Lecturer : Nasrullah   Website :
HTML, XHTML, and CSS Sixth Edition Chapter 1 Introduction to HTML, XHTML, and CSS.
HTML. Principle of Programming  Interface with PC 2 English Japanese Chinese Machine Code Compiler / Interpreter C++ Perl Assembler Machine Code.
Introduction to HTML Tutorial 1 eXtensible Markup Language (XML)
1 Welcome to CSC 301 Web Programming Charles Frank.
1Computer Sciences Department Princess Nourah bint Abdulrahman University.
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.
Overview Web Session 3 Matakuliah: Web Database Tahun: 2008.
1 Session 1: Introduction to PHP & MySQL iNET Academy Open Source Web Development.
Cs332a_chapt10.ppt CS332A Advanced HTML Programming DHTML Dynamic Hypertext Markup Language A term describing a series of technologies Not a stand-a-lone.
HOW THE WEB WORKS Reference: Learning Web Design (4 th edition) by Robbins 2012 – Chapter 2 (pp. 21 – 32)
IS-907 Java EE World Wide Web - Overview. World Wide Web - History Tim Berners-Lee, CERN, 1990 Enable researchers to share information: Remote Access.
NASRULLAH KHAN.  Lecturer : Nasrullah   Website :
PHP Introduction PHP is a server-side scripting language.
HTML Concepts and Techniques Fifth Edition Chapter 1 Introduction to HTML.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
Chapter 1 Introduction to HTML, XHTML, and CSS HTML5 & CSS 7 th Edition.
 Before you continue you should have a basic understanding of the following:  HTML  CSS  JavaScript.
Web Page Designing With Dreamweaver MX\Session 1\1 of 9 Session 1 Introduction to PHP Hypertext Preprocessor - PHP.
Web Design Terminology Unit 2 STEM. 1. Accessibility – a web page or site that address the users limitations or disabilities 2. Active server page (ASP)
PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used, free, and efficient alternative.
HTML PROJECT #1 Project 1 Introduction to HTML. HTML Project 1: Introduction to HTML 2 Project Objectives 1.Describe the Internet and its associated key.
PHP using MySQL Database for Web Development (part II)
Getting Started with Dreamweaver
4.01 How Web Pages Work.
Web Programming Language
4.01 How Web Pages Work.
A PRESENTATION ON (IN PHP,CSS,HTML)
Project 1 Introduction to HTML.
Introduction to Dynamic Web Programming
CISC103 Web Development Basics: Web site:
Chapter 1 Introduction to HTML.
Warm Handshake with Websites, Servers and Web Servers:
Project 1 Introduction to HTML.
Developing Web-Based Applications
Department of Computer Science, Florida State University
Database Driven Websites
CISC103 Web Development Basics: Web site:
Test 1 Review Website Basics, HTML, CSS
Web Page Concept and Design :
Getting Started with Dreamweaver
Tutorial 6 PHP & MySQL Li Xu
Introduction to World Wide Web
CIS 133 mashup Javascript, jQuery and XML
INFS 230 L Internet Technology
4.01 How Web Pages Work.
Web Servers (IIS and Apache)
Web Application Development Using PHP
Presentation transcript:

Introduction to Web Programming SCSC Mentoring Special Class Made Harta Dwijaksara –

Content  Introduction  3 Tier Architectures  Web Server (Apache)  Client Side Programming  HTML, CSS, and Java Script  Server Side Programming  PHP and MySQL 2

Introduction  Internet : is a global system of interconnected computer networks that use the standard Internet protocol suite(TCP/IP) to link several billion devices worldwide (wikipedia).computer networksInternet protocol suite How can the interconnected devices talk each others? through protocol stack on network layer. 3

Introduction  Network Layer (OSI 7 Layers) Internet Link Ex. User Request (HTTP, Telnet, SSH, RPC, etc.) TCP/UDP (port) IP 4

3 Tier Architectures  Multi-tier architecture is a client–server architecture in which presentation, application processing, and data management functions are physically separated.client–server architecture 5

3 Tier Architectures of Web  Comprise of : Web-Client, Web Server, Database Server 1.Web server running a service on port 80/8080 for HTTP (web) service 2.User Browsing (IE, Chrome, Opera,etc.)  HTTP(s) request to Web Server ( 3.Web server process the request and gives the HTTP response (web page content) 4.Web browser takes the response and display through web browser GUI 6

Packet Capturing using WireShark  HTTP request 7

Packet Capturing using WireShark  HTTP response 8

Web Technology (Tools)  Each tier has different technology solution Run on client Computer Run on server (web server) Run on server (database server) 9

Web Server (Apache HTTP Server)  Web server is a program that generate and transmit response to client request for web resource  Handling a client request consists of several key steps Parsing the request message Checking that the request is authorized associating the URL in the request with a file name Constructing the response message Transmitting the response message to the requesting client  Web Server vs Web Site Web-site consist of a collection of web-pages associated with a particular hostname Web server is a program to satisfy client request for web resource 10

Web Server (Apache HTTP Server)  The Apache HTTP Server Freely Available Binaries and Source Code Cross platform implementation Became the #1 Web Server on the Internet in less than a year  Getting Started Download : Run the installer file.msi and follow the instruction Open port 80 (8080 in case you need to use HTTPS) Allow the httpd service to use the port 11

Web Server (Apache HTTP Server)  Little Introduction to Configuration File Listen Port  Listen 80 o the port address where the httpd service should listen to request LoadModule  LoadModule php5_module “php5apache2_4.dll” o There a lot of modules can be added to apache ServerName  ServerName o The server name registered on DNS (can be changed with IP address) DocumentRoot  DocumentRoot “C:/file/WEB” o The location of your web page data (web page resource) 12

Setting Up Web Site (Apache HTTP)  Creating Home Director  Create a directory with the following structure  MYHOME  Ex. D:/WWW/MYHOME or /usr/www/MYHOME  Change the configuration file  Setting the listening port to 80  Set the DocumentRoot to the path of previously made home directory  Run the apache httpd service  Test your first server   If there is no error it will show “it works” 13

14

Client Side (HTML)  HTML : HyperText Markup Language is the standard markup language used to create web pages.  Another markup language : XML, SGML, XHTML, etc.  Version (W3School : HTMLHTML+HTML 2.0HTML 3.2 HTML 4.01 XHTMLHTML

HTML : HyperText Markup Language  HTML Basic  index.html  Preview on browser  16

HTML : HyperText Markup Language  Some HTML tags ( 17

HTML5 Tags  HTML5 Tags  The New Element  New Media Elements TagDescription Defines sound or music content Defines containers for external applications (like plug-ins) Defines sources for and Defines tracks for and Defines video or movie content TagDescription Defines graphic drawing using JavaScript 18

Client Side (CSS)  CSS : Cascading Style Sheet is a style sheet language used for describing the look and formatting of a document written in a markup language.  Inline CSS  External CSS 19

Client Side (CSS)  CSS Selector : allow you to select and manipulate HTML element(s).  The element Selector  The id Selector  keyword “id=…” on html tag  The class Selector  keyword “class=…” on html tag 20

CSS3 Modules  CSS3 has been split into "modules". It contains the "old CSS specification" (which has been split into smaller pieces). In addition, new modules are added.  CSS3 Border Properties  CSS3 Background Properties PropertyDescriptionCSS border-imageA shorthand property for setting all the border-image-* properties3 border-radiusA shorthand property for setting all the four border-*-radius properties3 box-shadowAttaches one or more drop-shadows to the box3 PropertyDescriptionCSS background-clipSpecifies the painting area of the background images3 background-originSpecifies the positioning area of the background images3 background-sizeSpecifies the size of the background images3 21

HTML : HyperText Markup Language  Designing : Web Layout WEB BANNER LEFT NAVIGATI ON FOOTER RIGHT NAVIGATI ON MAIN CONTENT MAIN NAVIGATION 22

WEB DESIGN: HTML + CSS 23

24

Client Side Programming (JavaScript)  Why JavaScript? : JavaScript is one of 3 languages all web developers MUST learn:  HTML to define the content of web pages  CSS to specify the layout of web pages  JavaScript to program the behavior of web pages  Example Scenario Web Page (Client Side) Web Engine (Server Side) request response The request format should be verified on the client side thus verification process will not burden the web server 25

Client Side Programming (JavaScript)  In-line Script  External Script HTML file JavaScript file 26

Server Side Programming (PHP)  What is PHP?  PHP is an acronym for "PHP Hypertext Preprocessor"  PHP is a widely-used, open source scripting language  PHP scripts are executed on the server  PHP costs nothing, it is free to download and use  Why is PHP?  Runs on various platforms (Windows, Linux, Unix, Mac OS X)  Compatible with almost all servers used today (Apache, IIS, etc.)  PHP supports a wide range of databases  PHP is free. Download it from the official PHP resource:  PHP is easy to learn and runs efficiently on the server side  PHP test : phpinfo() 27

Server Side Programming (PHP)  PHP file (*.php)   PHP code:  PHP comment: 28

Database Management MYSQL  MySQL is the world's most popular open source database.  Installation  Download :  Run installer and follow instruction  Go to PHP installation directory and update php.ini file  Uncomment ;extension=php_mysql.dll  Check the phpinfo(); 29

Database Management MYSQL  Access Database : Command Prompt  Create User  Ex: create user identified by ‘admin’;  Create Database  Ex: create database mywebpage  Grant database access to user ‘admin’  Ex: grant all on mywebpage.* to 30

Database Management MYSQL  Create Table for Web Page  User Table create table user ( userid varchar(20), password varchar(20), fullname varchar(20), varchar(20), primary key(userid), );  Article Table create table article ( userid varchar(20), title varchar(50), content text, date varchar(20), primary key (userid, date); ); 31

PHP + MySQL : Connection  Connection Preparation  Database Connect  SQL Query  Close Connection $mysql_host ="localhost";// IP address or hostaname $mysql_user = "admin"; $mysql_pass = "admin"; $mysql_db = "webpage"; $mysql_table_user = "user“; mysql_connect($mysql_host,$mysql_user,$mysql_pass) or die(mysql_error()); mysql_select_db($mysql_db) or die(mysql_error());; $sql = "insert into $mysql_table_user (userid, password, fullname, ) values ('$new_user','$new_pass','$new_name','$new_ ')"; mysql_query($sql) or die(mysql_error()); mysql_close($con); 32

Dynamic Web Page (1)  Scenario  User Login to get access to update the web-page  User add new article to web-page  The query is forwarded by web server to database server Web Client (Browser) Web Server (PHP) User Login Database (MySQL) Login Request Login Verification Login Response Login success Add Data Add data Request Update Database 33

Dynamic Web Page (2) 34

Thank you! 35