By: John Kaster
Abstract: A brief introduction to installing and using Delphi for PHP
Delphi for PHP is a new product from CodeGear for developing with PHP applications, modules, libraries and components "the Delphi way." Delphi for PHP is a Rapid Application Development (RAD) environment with a designer, editor, debugger, deployment wizard, and component framework called "VCL for PHP."
Our existing Delphi customers will find it extremely familiar. We hope PHP developers will find it very productive, fun, and friendly to use.
While Delphi for PHP™ applications can run on any device supporting PHP, the integrated development environment (IDE) is only supported on the Microsoft Windows platform in this release. After you have your installation file for Delphi for PHP, you can run the installation tool.
When you run the install, you will first see this screen.
Click Next, and you'll see a license agreement dialog.
The text won't be blurry like it is in this screen shot, however!
If you click I accept the agreement and Next, you'll see a dialog similar to the following:
Specify the folder for your install, and click Next.
You can change the name of the Start Menu folder if you want, and click Next.
Decide whether you want to create a desktop icon or not, and click Next.
If your installation choices are correct, click Install.
The install will start running. At any time, you can click Cancel to roll back the installation process and cancel the install. Hide image
After the installation completes, you are ready to use Delphi for PHP. If you leave the checkbox checked and click Finish, the IDE will load. Everything you need to develop and test a PHP application on your local machine has been installed and configured, including PHP, Apache, InterBase and MySQL Database engines and PHP connectivity for them.
The Delphi for PHP IDE is written in Delphi, but it is not currently part of the Galileo IDE, which is the host environment for Delphi, C++Builder, and C#Builder. It should be very familiar to any Delphi, C++Builder or C#Builder developer however. We have made it as similar to the developer studio IDE as possible for this first release.
The first thing you will see is the attractive splash screen.
When the IDE first loads, the welcome page and the default layout view is displayed.
The welcome page provides direct links to recent projects, recent files, and headlines relevant to Delphi for PHP. The headlines are provided automatically from RSS and/or atom feeds published by CodeGear, and are only updated when you are connected to the internet.
To create a new project, click the New button on the welcome page, select the File | New menu item and pick the option you want to create.
If you click New or select Other … you will see this dialog:
Select Application and click OK. This will create the application and present the design interface to you.
As you can see, the Welcome page has been replaced by the PHP form designer. The Code Explorer tab is populated with an outline of navigation points for your form. The Object Inspector allows you to edit the properties of the selected item on the design surface. (Right now, the selected item is the form itself.) The Project Manager shows all files related to this project (or group of projects). The Tool Palette lists all the components you can drag and drop onto the form designer.
Now that the blank form is displayed in the designer, we can drop the components onto it directly from the tool palette. So, let's drop an Edit, ListBox, and Button component onto the form. I'll resize the Edit so it is the same width as the ListBox, and put the Button to the right of the Edit control.
Note: You can also double click on a component to put a copy of it on the center of the design surface and move it from there.
Next, I'll change the caption for the button to "Add" in the object inspector, and double click on the button to create its click event.
This creates the event stub for the button click event, and puts me in the source code editor right inside the click event. I'm ready to type my code. The final version of the Button click event is:
function Button1Click($sender, $params)
$this->ListBox1->Items = $this->Edit1->Text;
When the application is run, the browser looks something like this:
We can type text in the edit box, and click the Add button to prove how easy and fast it is to design and build applications with Delphi for PHP.
Stay tuned for more information on Delphi for PHP. This article is intended to introduce the basic concepts of Delphi-style development for PHP, but there is much more to cover for the rich world of PHP development!
Click here to download a free 30-day trial of HTML5 Builder, part of RAD Studio XE6>
@RADtools on Twitter
Server Response from: ETNASC02