 |
MC Press Online eBookStore |
|
IBM i Programmer's Guide to PHP, The |
| Authors: Jeff Olen, Kevin Schroeder | | Publisher: MC Press Online | | Publication Date: May 2009 | | Subject: Computer: Programming & Software Engineering |
|
|
|
|
|
| | About this title |
This is the first book to comprehensively address PHP and how it can—and should—be deployed on IBM i. With this IBM i-specific point of view, the authors examine how to transfer skills from a green-screen environment to the Web, become intimately familiar with PHP's commonly used features, and help start down the road of highly interactive Web-based application development.
For decades, the green screen has been the ubiquitous interface into an organization's data. But with the advent of HTML, the Internet, and the browser, combined with the end user's existing familiarity with the Web, green-screen developers are seeing much of the demand for their skills diminish in favor of more Web-enabled technologies. One of those technologies is the PHP programming language.
A flexible, forgiving programming style makes PHP easier to learn and is just one of the many reasons PHP tops the list when developers seek to improve their Web-related skills. While not limited to Web development, PHP is designed from the ground up to be the ideal environment to easily build simple or complex Web-based applications in the most effective manner possible, while still giving programmers the control they need.
With The IBM i Programmer's Guide to PHP, you will learn to:- Build basic PHP applications and how to structure them
- Access local and remote resources, as well as external data sources
- Manage persistence between requests and the life of an individual request from browser to server to browser
- Tap System i DB2 database tables from PHP
- Install and access MySQL databases on the System i
|
| About authors |
Jeff Olen — Jeff Olen is co-founder of Olen Business Consulting, a provider of custom System i software solutions. Jeff has more than 20 years of experience with IBM midrange systems, including all the incarnations of the System i. His company has developed PHP applications on the System i for a wide variety of companies and continues to assist companies in switching to PHP. Jeff has extensive development experience using a wide variety of programming languages.
Kevin Schroeder — Kevin Schroeder, Technology Evangelist for Zend Technologies, is well-versed in a wide variety of technologies pertinent to both small- and large-scale application deployments. He has developed production software using PHP and many other languages, including ASP, HTML, Java, JavaScript, Perl, SQL, Visual Basic, and occasionally C. Kevin also has extensive experience as a system administrator on Linux, Solaris, Windows, and other platforms on scales of a single server up to several hundred servers on installations ranging from a few to millions of users. He has spoken at several conferences, is author of You Want To Do WHAT With PHP? (MC Press, 2010) and co-author of The IBM i Programmer's Guide to PHP (MC Press, 2009). In his spare time Kevin races Ferraris, with a dismal win record in his Honda. He can be found online at www.eschrade.com speaking in the first person.
|
| Contents |
Introduction
Chapter 1: Getting Started
Static vs. Dynamic Content
Client-side vs. Server-side
What You'll Need
Testing Your Zend Core Install
PHP Syntax
Variable Names
Data Types
Comments
Single Quotes vs. Double Quotes
Escape Sequences
Odds and Ends
Your First PHP Script
About the Code Examples and Output
Exam and Exercise
Chapter 2: Language Basics
Language Elements and Syntax
Basic Language Components
Assignment Operator
Basic Math Operators
Increment and Decrement Operators
Concatenation Operator
Comparison Operators
Logical Operators
Ternary Operator
Operator Precedence
Variable Scope
Reference Operator
Including Source Files
Exam and Exercise
Chapter 3: Control Structures and Loops
Conditional Structures
The if Statement
The switch Statement
Loops
The for Loop
The while Loop
The do-while Loop
Modifying Loop Iteration
Exam and Exercise
Chapter 4: Arrays
Creating Arrays
Appending Data to an Array
Iterating Through Array Values
Associative Arrays
Multidimensional Arrays
Sorting Arrays
Other Array Functions
Merging Arrays
Exam and Exercise
Chapter 5: Functions
Internal Functions
User-Defined Functions
Parameters
Optional Parameters
Passing by Reference
Variable Scope
Variable Functions
Function Functions
create_function()
call_user_func()
call_user_func_array()
func_get_args()
func_num_args()
function_exists()
register_shutdown_function()
Exam and Exercise
Chapter 6: Files and Streams
Basic File Handling
The “f ” Functions
The “fi le” Functions
Handling Directories
Common PHP Functions
The Underlying Wrappers
Filesystem Wrapper
HTTP/HTTPS Wrapper
FTP/FTPS Wrapper
Input/Output Stream Wrapper
Compression Streams
Data Wrapper
SSH2 Wrapper
Additional Wrappers
Exam and Exercise
Chapter 7: Classes
Introduction to OO
Moving On
Inheritance
Contexts
Interfaces
Polymorphism
Abstract Classes
The Three Ps
More Magic Methods
__sleep() and __wakeup()
__toString()
__set(), __get(), __isset(),__unset(), and __call()
Exceptions
__autoload
The OOP Callback
Exam and Exercise
Chapter 8: Database Access
Installation and Setup
Installing MySQL
Starting MySQL Server
MySQL Setup
Accessing MySQL Tables
Databases and Tables vs. Libraries and Files
SQL Query Results (Recordsets)
MySQL Functions
Creating MySQL Databases and Tables
Data Access Objects and Value Objects
IBM_DB2 File Access
DB2 Functions
Creating DB2 Databases and Tables
Data Access Objects and Value Objects on the System i
PHP Data Objects
Exam and Exercise
Chapter 9: Sessions and Cookies
Cookies
Baking Cookies
Cookie Security
Sessions
Session Save Handler Extensions
Session Security
Exam and Exercise
Chapter 10: Zend Core for i5/OS
Program Calls from and to PHP
The Zend Toolkit Classes
RPG Programs for the Examples
System i Program Call Example
System i Service Program Function Call Example
Values RETURNed from Procedures
Using Program Call Markup Language (PCML)
Calling a PHP Script from RPG or CL
Record-Level File Access
Sequential File Access
Indexed File Access
Accessing a File by Record Number
Adding and Updating Records
Using System i Commands
Exercises
Appendix A: Zend Studio for i5/OS
i5 Integration
PHPDocumenter
Zend Framework Integration
Zend Debugger and Profi ler
Zend Platform Integration
Appendix B: Frameworks
Overview of the Frameworks
Symfony
Cake PHP
CodeIgniter
Zend Framework
|
| Reviews |
"At long last, here is the perfect book to recommend to anyone who is considering adopting PHP for IBM i development."
— Mike Pavlak, Solutions Consultant, Zend Technologies, Inc.
|
| Related titles |
|
|
| |
|
|
|
|
If download option is selected, Adobe Acrobat 5.0 or later is required to read our e-books*
* Windows PC, Mac OS9/OSX, and Linux |
| |
 |
 |