Details zum E-Book

PHP Oracle Web Development: Data processing, Security, Caching, XML, Web Services, and Ajax. A practical guide to combining the power, performance, scalability, and reliability of the Oracle Database with the ease of use

PHP Oracle Web Development: Data processing, Security, Caching, XML, Web Services, and Ajax. A practical guide to combining the power, performance, scalability, and reliability of the Oracle Database with the ease of use

Yuli Vasiliev

E-book
Oracle Database gets high marks for performance, reliability, and scalability. Building and deploying your PHP applications on Oracle Database enables you to combine the power and robustness of Oracle and the ease of use, short development time, and high performance of PHP. When used in a complementary way, PHP and Oracle allow you to build high-performance, scalable, and reliable data-driven Web applications with a minimum of effort.When building a PHP/Oracle application, you have two general options. The first is to use an Oracle database just to store data, performing all the operations on that data on the client side; the other is to use the database not only to store data, but also to process it, thus moving data processing to the data. While building the key business logic of a database-driven PHP application inside the database is always a good idea, you should bear in mind that not all of the databases available today allow you to do. The Oracle database, which offers record-breaking performance, scalability, and reliability, does. The partnership of Oracle and the open-source scripting language PHP is an excellent solution for building high-performance, scalable, and reliable data-driven web applications.This 100% practical book is crammed full of easy-to-follow examples. It provides all the tools a PHP/Oracle developer needs to take advantage of the winning combination. It addresses the needs of a wide spectrum of PHP/Oracle developers, placing the emphasis on the most up-to-date topics, such as new PHP and Oracle Database features, stored procedure programming, handling transactions, security, caching, web services, and Ajax.
  • PHP Oracle Web Development
    • 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 5s 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
  • Titel: PHP Oracle Web Development: Data processing, Security, Caching, XML, Web Services, and Ajax. A practical guide to combining the power, performance, scalability, and reliability of the Oracle Database with the ease of use
  • Autor: Yuli Vasiliev
  • Originaler Titel: PHP Oracle Web Development: Data processing, Security, Caching, XML, Web Services, and Ajax. A practical guide to combining the power, performance, scalability, and reliability of the Oracle Database with the ease of use
  • ISBN: 9781847193643, 9781847193643
  • Veröffentlichungsdatum: 2007-07-30
  • Format: E-book
  • Artikelkennung: e_2wkm
  • Verleger: Packt Publishing