Before you start
This tutorial is for AIX® 5.3 developers who want to get up to speed in integrating both PHP and Java™ technology in Web application development. In this tutorial, you will complete the process of building a solution that uses PHP for the front end to a back-end Java class for your Survey application. You'll also examine the differences between the Web service and PHP Java Bridge interfaces and the differences between PHP and Java development methods before examining the final solution for a PHP interface to your back end Java classes. You should have basic Java programming knowledge and basic Web development environment knowledge.
PHP is a top Web development language, and the Java language is popular for business application development. Thus, to use the strengths of each language on the AIX Version 5.3 operating system, the PHP Java Bridge has been developed. This series shows AIX 5.3 developers how to integrate both PHP and Java technology in their Web application development.
To demonstrate this, you will build a simple Survey application that follows a typical development process, including:
- Developing the main Java application
- Exposing the Java application through servlets as a Java-based Web application
- Adding support for storing information within a database
- Exposing the original application as Web service and providing a PHP interface to the application
- Redeveloping the PHP interface using the dedicated PHP Java Bridge
The series is split into six parts:
- Part 1 looks at the application and sets up an environment ready for building Java applications and serving Java-based Web applications using Tomcat.
- Part 2 covers the main application code and the development of a simple Java Servlet to provide a Web interface to the information.
- Part 3 connects the core application to a DB2® database for the storage of the survey questions and responses.
- Part 4 converts the original application into one that can be accessed as a Web service, and it provides the base for the PHP interface.
- Part 5 builds the PHP interface to the Java application by using the PHP Java Bridge.
- Part 6 redevelops the application to make use of the PHP Java Bridge in place of the Web service interface.
In this final tutorial of the series, you are going to look at using PHP and Java technology together to build a Web interface to your original Java classes that support the Survey application. This final solution uses the PHP Java Bridge to allow you to build a PHP-based interface to the Java classes developed in the first few parts of this series.
You are going to first look at the PHP Java Bridge and compare its operation to the Web service method that you originally developed, thus comparing the different technologies. Then you'll examine the different methods for integrating your PHP and Java-based solution before examining a final alternative for your PHP interface to the original Java class.
You need the following software to follow along with this tutorial:
- IBM pSeries® server (This code was tested using AIX Version 5.3.)
- Apache Tomcat system
- The Eclipse IDE
- The Java 5 64-bit SDK (You need to register to download this package, but registration is free.)
- The Mozilla Web browser for AIX