Академический Документы
Профессиональный Документы
Культура Документы
IBM/i
By Trevor Seeney
A Case Study
An Item Inquiry Application
Implemented at Thermwell
With JQuery Mobile deployed
Application Parameters
Each inquiry request usually needs a Part
number and a Warehouse Id which are
passed in through the URL.
Information about Items is restricted by
user so we identify the user through a
login script.
PHP is an
Interpretive Language
A backward step (IMHO) from objectorientated languages.
Forces a dependence on Copy modules.
Creates a lot of include statements.
PHP server-side
vs.
Javascript client-side
Can get complicated!
PHP variables:$part = $_GET["part"];
$whse = $_GET["whse"];
Javascript variables:<?php echo '<script>partparm = "' . $_GET["part"] . '";</script>'; ?>
<?php echo '<Script>whseparm = "' . $_GET["whse"] .
Database Connection
<?php include '@ConnectDB.php' ?>
User Authentication
Uses cookies:
<?php
$cookie_name = 'logon';
if(!isset($_COOKIE[$cookie_name])) {
header("Location: i2iLogon.php");
}
else {
$user = $_COOKIE[$cookie_name];
}
?>
9,340
require_once('ToolkitService.php');
include '@ConnectTK.php' ;
?>
* Source AlanSeiden.com
array
Debbuging
Is difficult.
Start a service program
Embed JavaScript alerts or PHP echos into
your script
Use other technical resources (Ron, Steve or
Julie)