Before you start
The world's a stage, and every one plays their part. So goes the proverb. But where does that leave us in this day and age of home theaters and ever growing DVD collections? With thousands of choices over what to pick for entertainment, and a headache with trying to keep track of it all.
But what if there were a means to store and search all the information about the movies in our personal collection? We could decide what to watch, based on almost any whim. Feel like a tear-jerking drama? How about a blockbuster starring Denzel Washington? Or a period-piece comedy with Derek Jacobi and Ian McKellan? With enough stored information, and a usable retrieval system, it suddenly gets a lot easier to do.
In this tutorial, you'll learn how to combine the Eclipse integrated development environment, the PHP Hypertext Preprocessor, and the new XML capabilities of DB2 9 into a Web application to deliver this storage and retrieval system.
After completing this tutorial, you will understand how to store and retrieve XML data through PHP and a back end database. The applications and skills we'll cover in this specific example can be easily extrapolated into many other software development ideas for business processes.
This tutorial is written for software developers and analysts whose skills and experience are at an intermediate level. You should have a general familiarity with using an integrated development environment, and a basic knowledge of PHP webpage creation, SQL, and XML.
You will need:
- Workstation for the Eclipse IDE
- PHP Web server (enabled with either Apache or WebSphere Application Server Community edition with the new alphaWorks PHP extension)
- DB2 Express-C 9 database server
These tasks can be handled by three different computers, or you can set up all the applications on just one system.
The details of how to install these applications are covered in much more depth and detail elsewhere in developerWorks and on these applications' respective Web sites. See the Resources for links.
I won't go into much detail about specific product installation instructions in this tutorial. I will try to be as platform independent as possible. My Web server, DB2 database, and PHP installation are all on a Linux®-based (Red Hat Enterprise 4) system, and my Eclipse IDE is installed on a Microsoft® Windows® XP system. Of course, the setup is entirely up to you, as all of the kick-start applications are available for both Windows and Linux operating systems.


