万本电子书0元读

万本电子书0元读

顶部广告

PHP Oracle Web Development电子书

售       价:¥

4人正在读 | 0人评论 9.8

作       者:Yuli Vasiliev

出  版  社:Packt Publishing

出版时间:2007-07-30

字       数:506.8万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Through numerous examples, this book shows you how to build simple and efficient PHP applications on top of Oracle, efficiently distributing data processing between the Web/PHP server and Oracle Database server. Although this book covers only the most popular and up-to-date topic areas on the use of PHP in conjunction with Oracle, the author does not make any assumption about the skill level of the reader. Packed with information in an easy-to-read format, the book is ideal for any PHP developer who deals with Oracle.
目录展开

PHP Oracle Web Development

Table of Contents

PHP Oracle Web Development

Credits

About the Author

About the Reviewer

Preface

What This Book Covers

Who is This Book For?

Conventions

Reader Feedback

Customer Support

Downloading the Example Code for the Book

Errata

Questions

1. Getting Started with PHP and Oracle

Why PHP and Oracle?

Simplicity and Flexibility

Performance

Robustness

Exploring PHP and Oracle Alternatives

PHP and MySQL

JSF and Oracle

What You Need to Start

Pieces of Software Required

Oracle Database Considerations

Understanding the Oracle Database

Choosing Between Oracle Database Editions

Obtaining Oracle Database Software

PHP Considerations

Apache HTTP Server

Why PHP 5

Obtaining PHP

Making PHP and Oracle Work Together

Oracle Instant Client

Zend Core for Oracle

Using Oracle SQL*Plus

Why Use SQL*Plus in PHP/Oracle Development?

Connecting to a Database with SQL*Plus

Running Scripts in SQL*Plus

Putting It All Together

Creating Your First PHP/Oracle Application

Connecting to a Database

Using the Local Naming Method

Using the Easy Connect Method

Issuing an SQL Statement Against the Database

Fetching and Displaying Results

Summary

2. PHP and Oracle Connection

Introducing the PHP OCI8 Extension

Why Use OCI8 Extension

Processing SQL Statements with OCI8

Connecting to Oracle with OCI8

Defining a Connection String

OCI8 Functions for Connecting to Oracle

Parsing and Executing SQL Statements with OCI8

Preparing SQL Statements for Execution

Using Bind Variables

Executing SQL Statements

Handling Errors

Using the oci_error Function

Using the trigger_error Function

Using Exceptions

Fetching Results with OCI8

OCI8 Functions for Fetching

Fetching the Next Row

Fetching All the Rows

Alternatives to PHP OCI8 Extension

Using PEAR DB

Using ADOdb

Using PDO

Creating Your Own Library on Top of OCI8

Summary

3. Data Processing

Implementing the Business Logic of a PHP/Oracle Application

When to Move the Data to the Processing

Advantages of Moving the Processing to the Data

Ways of Implementing Business Logic Inside the Database

Interaction between Components Implementing Business Logic

Using Complex SQL Statements

Employing Oracle SQL Functions in Queries

Oracle SQL Functions versus PHP Data Processing

Aggregate Functions

The GROUP BY Clause

Using Join Queries

Taking Advantage of Views

The Key Benefits of Using Views

Hiding Data Complexity with Views

Using the WHERE Clause

Using Stored Subprograms

What are Stored Subprograms?

Advantages of Stored Subprograms

An Example of When to Use a Stored Subprogram

Creating Stored Subprograms

Calling Stored Subprograms from PHP

Using Triggers

Creating Triggers

Firing Triggers

Calling Stored Procedures from a Trigger

Summary

4. Transactions

Overview of Transactions

What is a Transaction?

What are ACID Rules?

How Transactions Work in Oracle

Using Transactions in PHP/Oracle Applications

Structuring a PHP/Oracle Application to Control Transactions

Developing Transactional Code

Controlling Transactions from PHP

Moving Transactional Code to the Database

Using Triggers

Dealing with Statement-Level Rollbacks

Transaction Isolation Considerations

What OCI8 Connection Function to Choose

Concurrent Update Issues

Locking Issues

Lost Updates

Autonomous Transactions

Summary

5. Object-Oriented Approach

Implementing PHP Classes to Interact with Oracle

Building Blocks of Applications

Creating a Custom PHP Class from Scratch

Testing the Newly Created Class

Taking Advantage of PHP 5's Object-Oriented Features

Functionality and Implementation

Reusability

Handling Exceptions

Modifying an Existing Class to use Exceptions

Distinguishing between Different Error Types

Are Exceptions Necessarily Errors?

Extending Existing Classes

Using Standard Classes

PEAR::Auth in Action

Securing Pages with PEAR::Auth

Customizing Standard Classes

Customizing PEAR::Auth

Building More Compact Client Code

Interactions between Objects

Composition

Aggregation

Event-Driven Communication

Using Oracle Object-Relational Features

Using Oracle Object Types

Implementing Business Logic with Methods of Oracle Objects

Using Oracle Objects to Simplify Application Creation

Summary

6. Security

Securing PHP/Oracle Applications

Authenticating Users

Separating Security Management and Data

Using Two Database Schemas to Improve Security

Using Three Database Schemas to Improve Security

Employing PL/SQL Packages and Table Functions to Securely Access Database Data

Using the %ROWTYPE Attribute

Building a Custom Storage Container for the PEAR::Auth Class

Testing the Authentication System

Performing Authorization Based on the User Identity

Using Sessions to Hold Information about the Authenticated User

Holding a User's Information in Package Variables

Protecting Resources Based on Information about the Authenticated User

Hashing

Hashing Passwords

Modifying an Authentication System to Use Hashing

Setting Up Fine-Grained Access with Database Views

Implementing Column-Level Security with Views

Masking the Column Values Returned to the Application

Using the DECODE Function

Implementing Row-Level Security with Views

Using VPD to Implement Row-Level Security

Summary

7. Caching

Caching Data with Oracle and PHP

Caching Queries on the Database Server

Processing SQL Statements

Using Bind Variables to Increase the Probability of Shared Pool Cache Hits

Using Oracle's Application Contexts for Caching

Creating a Global Application Context

Manipulating Data Held in a Global Context

Resetting Values in a Global Context

Caching Mechanisms Available in PHP

Choosing a Caching Strategy

Caching Function Calls with the PEAR::Cache_Lite Package

Updating Cached Data

Implementing Notification-Based Caching

Using Database Change Notification

Auditing Notification Messages

Building a PL/SQL Procedure Sending Notifications to the Web Server

Performing Configuration Steps Required for Change Notification

Building the Notification Handler

Creating a Query Registration for the Notification Handler

Quick Test

Implementing Notification-Based Caching with PEAR::Cache_Lite

Summary

8. XML-Enabled Applications

Processing XML in PHP/Oracle Applications

Processing XML Data with PHP

Creating XML with the DOM PHP Extension

Querying a DOM Document with XPath

Transforming and Processing XML with XSLT

Performing XML Processing inside the Database

Using Oracle SQL/XML Generation Functions

Moving All the XML Processing into the Database

Storing XML Data in the Database

Performing XSLT Transformations inside the Database

Building PHP Applications on Oracle XML DB

Using Oracle Database for Storing, Modifying, and Retrieving XML Data

Database Storage Options for XML Data in Oracle Database

Using XMLType for Handling XML Data in the Database

Using XML Schemas

Retrieving XML Data

Accessing Relational Data Through XMLType Views

Using XMLType Views

Creating XML Schema-Based XMLType Views

Performing DML Operations on XML Schema-Based XMLType Views

Using Oracle XML DB Repository

Manipulating Repository Resources with PL/SQL

Accessing Repository Resources with SQL

Taking Advantage of Standard Internet Protocols

Handling Transactions

Querying Data with Oracle XQuery

Using XQuery to Construct XML from Relational Data

Breaking up XML into Relational Data

Summary

9. Web Services

Exposing a PHP/Oracle Application as a Web Service Using PHP SOAP Extension

Communicating Using SOAP

What you Need to Build a SOAP Web Service

Building a SOAP Web Service on Top of a PHP/Oracle Application

Building the Business Logic of a Web Service Inside the Database

Creating an XML Schema to Validate Incoming Documents

Generating Unique IDs for Incoming Documents

Creating PL/SQL Subprograms Implementing the Business Logic of the Web Service

Building a PHP Handler Class

Using WSDL

Creating a SOAP Server with PHP's SOAP Extension

Building a SOAP Client to Test the SOAP Server

Adding Security

Implementing Authorization Logic Inside the Database

Creating a PHP Handler Class

Creating a WSDL Document

Creating a Client Script

Summary

10. AJAX-Based Applications

Building AJAX-Based PHP/Oracle Applications

AJAX Interactions

Designing an AJAX/PHP/Oracle Monitoring Application

Building Blocks of an AJAX-Based Solution

Creating the Data Structures

Building the PHP Script that will Process AJAX Requests

Using the XMLHttpRequest JavaScript Object

Putting It All Together

Using Caching to Further Improve Responsiveness

Implementing Master/Detail Solutions with AJAX

Planning a Master/Detail Solution that uses AJAX

Building the Sample Application

Creating the Data Structures

Generating HTML with Oracle XQuery

Sending Post Requests with AJAX

Styling with CSS

Putting It All Together

Summary

A. Installing PHP and Oracle Software

Installing Oracle Database Software

Installing Oracle Database Enterprise/Standard Editions

Installing Oracle Database Express Edition (XE)

Installing Oracle Database XE on Windows

Installing Oracle Database XE on Linux

Installing Apache HTTP Server

Installing PHP

Installing PHP on Windows

Installing PHP on Unix-Like Systems

Testing PHP

Bridging the Gap Between Oracle and PHP

Oracle Instant Client

Enabling the OCI8 Extension in an Existing PHP Installation

Installing SQL*Plus Instant Client

Installing Zend Core for Oracle

Installing Zend Core for Oracle on Windows

Installing Zend Core for Oracle on Linux

Index

累计评论(0条) 1个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部