Book Image

PHP Oracle Web Development: Data processing, Security, Caching, XML, Web Services, and Ajax

By : Yuli Vasiliev
Book Image

PHP Oracle Web Development: Data processing, Security, Caching, XML, Web Services, and Ajax

By: Yuli Vasiliev

Overview of this 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.
Table of Contents (16 chapters)
PHP Oracle Web Development
Credits
About the Author
About the Reviewer
Preface

Why PHP and Oracle?


With Oracle as the back-end database, you can develop and deploy data-driven PHP applications with a powerful, proven, and industry-leading infrastructure, while still taking advantage of PHP's ease of use, short development time, and high performance.

Simplicity and Flexibility

One of the key reasons behind PHP's popularity is its simplicity. So, you don't have to be a PHP guru to start building PHP applications on Oracle. All you need to learn are a few APIs, which allow you to interact with the database and handle the received data. The example discussed later in this chapter will show you how to build a simple PHP/Oracle application by using a few OCI8 functions.

PHP's Object-Oriented features, available since PHP 3 and significantly improved in PHP 5, help you create complex applications easily and quickly. Once a class has been written and debugged, you can reuse it in a number of ways. This allows you to reuse well‑designed pieces of object-oriented code over and over, reducing or eliminating redundant code in your applications. For a detailed discussion of how to combine the power of object-oriented PHP and Oracle, refer to Chapter 5

From a PHP developer's perspective, developing PHP/Oracle applications is much easier than developing, PHP/MySQL applications. This is because, in the case of Oracle database, you may implement key business logic of the application on the database side. This not only reduces the amount of PHP code, but also improves the performance and scalability of the entire application.

If you are a PHP developer who tends to think that Oracle database represents a complicated, hard-to-drive mechanism, you should realize that—no matter how complex the Oracle insides may be—what really matters is that Oracle offers a lot of comprehensive tools intended to help you manage database objects and access data stored in the database with minimum effort. Although coverage of all the tools is beyond the scope of this book, the examples provided throughout the book will help you to obtain a good understanding of how Oracle SQL and PL/SQL—two of the most popular Oracle tools—are used to access and manipulate data, metadata, and other database resources.

Performance

Although you can process your application data on the client side in the case of Oracle database, there are many advantages of processing data inside the database. From a performance standpoint, moving processing to the data allows you to:

  • Reduce the communication overhead between the web server and the database

  • Conserve the web server resources

  • Take advantage of optimizations and indexing techniques provided by the Oracle database

By using triggers and stored procedures, you can develop an application whose business logic resides entirely inside the database. Moving data processing to the database tier is particularly useful if your application is database intensive. This is because your application doesn't need to transfer a large amount of data between tiers while processing data inside the database; instead, it sends only the final product across the wire.

Robustness

Oracle gets high marks when it comes to 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. By using both of these technologies in a complementary way, you will be able to:

  • Move key business logic of your application to the data

  • Protect your application against data loss

  • Take advantage of Oracle security technologies

  • Leverage the power of object-oriented technology

  • Build transactional applications

  • Develop robust XML-enabled applications

All these capabilities make using PHP in conjunction with Oracle a natural choice when it comes to developing mission-critical, highly secure data-driven web applications.