Development of Web Applications – Introduction revisited Jouni Juntunen Seniour Lecturer Oulu University of Applied Sciences School of Business and Information Management
Contents Web-applications How Internet and web-applications work HTML-forms HTTP (HyperText Transfer Protocol) Introduction to PHP
Web-applications What (dynamic) web-applications you have used? Examples: https://netbank.nordea.com/pnbdemo/login.do http://www.facebook.com http://www.finnair.fi http://www.ebay.com
Client-Server model Internet Server (e. g. oamk.fi) Browser HTTP-Request HTTP-Reply (X)HTML processed by the server (X)HTML presented by the browser
(X)HTML Hypertext Markup –language Is used to implement user-interface You write tags and the browser knows how to interpret them HTML-language (original) spesification can be found from http://www.w3.org/MarkUp Example
(X)HTML-forms TextFields Lists Buttons Etc. Nested into form Form can be submitted to server Example
HTTP Hypertext Transfer protocol The way browser and web-server are talking to each other Browser requests the service and server answers to that Connection is closed after server reply Understanding HTTP on http://www.perlfect.com/articles/http.shtml Tool for viewing HTTP-traffic http://web-sniffer.net/
PHP PHP Hypertext Preprocessor PHP is one of the web-server techologies PHP-language has features from C and Perl –languages (but is also looks like Java, because Java is also founded from C/C++)
PHP Script is written between: <? ?> -tags <php? ?> -tags <script language=”php”> </script> <html> <head><title></title></head> <body> <? print ”This is an example!”; ?> </body> </html>
Using PHP in applications HTML-form PHP-script