1) PHP – Personal Home Page Scripting Language 2) JavaScript.

Slides:



Advertisements
Similar presentations
PHP I.
Advertisements

Java Script Session1 INTRODUCTION.
PHP Hypertext Preprocessor Information Systems 337 Prof. Harry Plantinga.
Introduction to PHP MIS 3501, Fall 2014 Jeremy Shafer
The Web Warrior Guide to Web Design Technologies
Languages for Dynamic Web Documents
Server-Side vs. Client-Side Scripting Languages
B.Sc. Multimedia ComputingMedia Technologies Database Technologies.
Multiple Tiers in Action
2440: 141 Web Site Administration Web Server-Side Programming Professor: Enoch E. Damson.
1 CS428 Web Engineering Lecture 18 Introduction (PHP - I)
PHP: Introduction By Trevor Adams.
Server Side Scripting Norman White. Where do we do processing? Client side – Javascript (embed code in html) – Java applets (send java program to run.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
PHP: Hypertext Processor Fred Durao
August Chapter 1 - Essential PHP spring into PHP 5 by Steven Holzner Slides were developed by Jack Davis College of Information Science and Technology.
Server- Side technologies Client-side vs. Server-side scripts PHP basic ASP.NET basic ColdFusion.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Dr. Azeddine Chikh IS444: Modern tools for applications development.
JavaScript, Fifth Edition Chapter 1 Introduction to JavaScript.
PHP. Why should we learn web programming? No need write socket programming. - You can forget TCP/IP & OSI layers. - Web server handles socket tasks for.
Server-side Scripting Powering the webs favourite services.
Basics of Web Databases With the advent of Web database technology, Web pages are no longer static, but dynamic with connection to a back-end database.
IDK0040 Võrgurakendused I harjutus 06: PHP: Introduction Deniss Kumlander.
INTERNET APPLICATION DEVELOPMENT For More visit:
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
IST 210: PHP BASICS IST 210: Organization of Data IST210 1.
Client Scripting1 Internet Systems Design. Client Scripting2 n “A scripting language is a programming language that is used to manipulate, customize,
Client Side Programming with JavaScript Why use client side programming? Web sides built on CGI programs can rapidly become overly complicated to maintain,
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
Variables and ConstantstMyn1 Variables and Constants PHP stands for: ”PHP: Hypertext Preprocessor”, and it is a server-side programming language. Special.
Intro to PHP IST2101. Review: HTML & Tags 2IST210.
Introduction to PHP Advanced Database System Lab no.1.
ECA 225 Applied Interactive Programming1 ECA 225 Applied Online Programming basics.
By Tharith Sriv. To write a web page you use: HHTML (HyperText Markup Language), AASP (Active Server Page), PPHP (HyperText Preprocessor), JJavaScript,
הרצאה 4. עיבוד של דף אינטרנט דינמי מתוך Murach’s PHP and MySQL by Joel Murach and Ray Harris.  דף אינטרנט דינמי משתנה עפ " י הרצת קוד על השרת, יכול להשתנות.
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
Scripting Languages Client Side and Server Side. Examples of client side/server side Examples of client-side side include: JavaScript Jquery (uses a JavaScript.
ASP. ASP is a powerful tool for making dynamic and interactive Web pages An ASP file can contain text, HTML tags and scripts. Scripts in an ASP file are.
 Web pages originally static  Page is delivered exactly as stored on server  Same information displayed for all users, from all contexts  Dynamic.
Web Programming Overview. Introduction HTML is limited - it cannot manipulate data How Web pages are extended (include): –Java: an object-oriented programming.
IS2803 Developing Multimedia Applications for Business (Part 2) Lecture 2: Introduction to IS2803 Rob Gleasure
8 th Semester, Batch 2009 Department Of Computer Science SSUET.
Higher Computing Science Coding the Web: HTML, JavaScript, PHP and MySQL.
1 PHP Intro PHP Introduction After this lecture, you should be able to: Know the fundamental concepts of Web Scripting Languages in general, PHP in particular.
PHP Form Processing * referenced from
Dr. Abdullah Almutairi Spring PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used,
Web Page Designing With Dreamweaver MX\Session 1\1 of 9 Session 1 Introduction to PHP Hypertext Preprocessor - PHP.
Javascript Basic Concepts Presentation By: Er. Sunny Chanday Lecturer CSE/IT RBIENT.
JavaScript and Ajax (JavaScript Environment) Week 6 Web site:
PHP Overview. What is PHP Widely available scripting language Free Alternative to Microsoft’s ASP Runs on the Web Server; not in the browser Example:
IST 210: PHP Basics IST 210: Organization of Data IST2101.
Web Programming Java Script-Introduction. What is Javascript? JavaScript is a scripting language using for the Web. JavaScript is a programming language.
PHP Basics and Syntax Lesson 3 ITBS2203 E-Commerce for IT.
Introduction to Dynamic Web Programming
WWW and HTTP King Fahd University of Petroleum & Minerals
JavaScript is a programming language designed for Web pages.
Section 17.1 Section 17.2 Add an audio file using HTML
PHP (PHP: Hypertext Preprocessor)
PHP / MySQL Introduction
BASIC PHP and MYSQL Edward S. Flores.
PHP Introduction.
Your 1st Programming Assignment
JavaScript What is JavaScript? What can JavaScript do?
HYPERTEXT PREPROCESSOR BY : UMA KAKKAR
JavaScript What is JavaScript? What can JavaScript do?
Intro to PHP.
JavaScript Basics What is JavaScript?
JavaScript is a scripting language designed for Web pages by Netscape.
PHP: Hypertext Preprocessor
Presentation transcript:

1) PHP – Personal Home Page Scripting Language 2) JavaScript

The transition from static webpages to dynamic webpages means moving from plain webpages to web applications.

In a pill, how the web works? 1)There are two entities: a client (browser) and a server. 2)Traditionally, the client sends some information to the server at a specific URL, requesting a response in a form of an HTML file. 3)The server receives the request, processes it, and sends the HTML file back to the client. 4)The client receives the file and based on its HTML contents renders the webpage and displays it.

What happens when the request to the server is for execution of a CGI application? 1)There are two entities: a client (browser) and a server (with a CGI application). 2)The client sends a request for execution to the server at a specific URL, requesting a response as usual in a form of an HTML file. 3)The server receives the request, processes it by running a CGI application (a script, a C/C++ program, etc.), whose result is an HTML text, and sends the HTML text back to the client. 4)The client receives the response and based on its HTML content renders & displays the webpage.

PHP helps doing the same thing as a CGI: 1)There are two entities: a client (browser) and a server (with a PHP processor engine). 2)The client sends a request for execution to the server at a specific URL, requesting a response as usual in a form of an HTML file. 3)The server receives the request, passes it to the PHP engine, which runs a corresponding script and delivers the results as an HTML text to the server, which in turn passes it back to the client. 4)The client receives the response and based on its HTML content renders & displays the webpage.

PHP Hypertext Preprocessor (Personal Home Pages) A scripting language that offers unified approach to designing dynamic webpages: - it is free (open source) - it is fast in execution and easy to learn - it is universally portable to multiple platforms.

PHP code is embedded in the HTML code. A special tag, usually “ <?PHP ”: is recognized as marking the beginning of PHP code. Symbols “ /* ” and “ */ ” are C-style comments Symbols “ ?> ” mark end of PHP tag

PHP is nearly a typeless language: data types of variables are not declared beforehand, but determined when a variable is assigned a value data type of a variable can change when variable receives a different value integer, double, string, array, object, boolean are the data types used

Variable’s name in PHP must start with a dollar sign $, for example: $var Expression is a valid combination of variables and operators, for example: $var = $var Instruction (more correctly, a statement) is any syntactically valid entity ending with a semicolon, for example: $var = $var;

PHP code can be embedded in HTML directly, for example: This is <?php echo date('l, F dS Y.'); ?>

PHP code stored in a file can be also invoked from HTML, for example: <FORM ACTION="welcome1.php" method="post"> First Name: <INPUT TYPE="text" name="firstname" /> Last Name: <INPUT TYPE="text" name="lastname" />

PHP file welcome1.php would include the code to receive values from the form: <?php $firstname = $_POST['firstname']; $lastname = $_POST['lastname']; echo "Welcome to my website, $firstname $lastname!"; ?>

The typical use of PHP is with a database: - connecting to a database - performing queries - processing the results of a query - updating database entries - logging out and exiting

1) PHP – Personal Home Page Scripting Language 2) JavaScript

While PHP scripts allow interaction, they execute at the server site, which creates network traffic, so the need exists for running scripts on the client (browser) site. Thus JavaScript was created!

JavaScript has typical syntax of high-level languages, but does not require type declaration for variables. Their data types are determined automatically when a variable is assigned value.

JavaScript allows control of: the content of webpages the browser itself, and the HTML forms on the page.

In a pill, how it all works in JavaScript? JavaScript code is embedded in the HTML code:...JavaScript code goes here...

The most interesting feature of Javascript is event handling, which is an asychronous program control. Normally a program executes statements sequentially, one after another, perhaps branching, but still in a predetermined sequence.

This sequence may change abruptly when a certain event occurs, which needs immediate attention. Such situations happen with interrupts at the hardware level, and with JAVA and C++ exceptions at the software (programming language) level. To deal with it, one needs to develop an interrupt of exception handler.

In JavaScript, these abrupt events are some action requests triggered by the client. One can program a response to such events using event handlers, that is, code segments that react appropriately, depending on the kind of action desired by the client.

Sample events handled in JavaScript: onClick onMouseOver onKeyDown onLoad onSelect onAbort and many others.

Handling a sample event via a form (under the assumption that the event handler has been defined separately): <INPUT TYPE = ”button” VALUE = ”Click here” onClick=”alert(You clicked on me!”

JavaScript does not have: graphics capabilities file I/O networking multithreading.

Final Remarks Microsoft’s response to the emergence of JavaScript was VBScript (Visual Basic Scripting Edition) JavaScript can also run on the server side, but is much less popular, because of PHP & perl