A few days ago, I had the pleasure of discussing Delphi for PHP with Andreano Lanusse and Tim Del Chiaro of CodeGear. They took me through an extensive demonstration of its feature set and built a number of PHP pages showing how to tackle common programming tasks.
As I mentioned in my post about how CodeGear is extending the Borland legacy, Delphi for PHP is an IDE developed by CodeGear expressly for working with PHP. It is based on the same IDE as Delphi for Windows and C++ Builder, but it is designed for PHP programming. Now that I've been able to spend some time with Delphi for PHP, I'll provide a brief product overview.
Creating an integrated visual development platform
When CodeGear engineers looked at how PHP developers work, they saw that most PHP developers use a mixture of text editors, local Web server installations (or test machines), a separate debugger (or no debugger at all), a separate HTML editor, and so on.
Looking under the hood
With Delphi for PHP, the CodeGear team is striving to give PHP developers a tool comparable to what ASP.NET or JSP/J2EE developers have. From my brief time working with the product and watching the CodeGear demo, I think the experience is fairly comparable.
Delphi for PHP brings together all of the pieces in a way familiar to Visual Studio users. You have a design view of the page, optionally with a "split" between the code and a visual WYSIWYG designer. Double-clicking a control takes you to code for the control and starts a new event handler for the most common event on the control. The code is separated into two files -- one for the design and one for the underlying code -- which creates a separation of logic and content.
All of the expected debugging tools are here too: watches, breakpoints, local and global variables, a call stack, and a code profiler. While this may be old hat for ASP.NET and Java developers, this is all new stuff for most PHP developers. The HTML editor is functional but not flashy. Since most PHP programmers are already accustomed to hand-editing their HTML, I think this will be considered a benefit.
There is also native support for a wide range of databases; this means that you can use Delphi for PHP in environments that are not MySQL (the database of choice in PHP development) shops. The controls support data binding, much like ASP.NET and Java do. I did not get to dive deep enough into the data binding to see if it suffers from the same lack of flexibility that hold back ASP.NET's controls. The VCL is 100% open source; this means that, unlike the ASP.NET controls, you can change (and then redistribute those changes) the default controls to suit your needs.
My favorite features
An attractive feature of Delphi for PHP is that, unlike some other products (Visual Studio comes to mind), the idea of a "project" or a "solution" is not deeply ingrained into the code that is produced. As a result, you can open any PHP code in the IDE to edit or debug it without needing to create a huge structure of editor metadata around it. This means that it is a great product to use to dive right into existing code.
In addition, it's easy to deploy the projects. Because everything is pure PHP, the only server-side requirement is a standard PHP 5 installation. (PHP 4 is not supported because it leverages the OO support in PHP 5.) The IDE currently sports a Deployment Wizard that deploys to a file system, and an upgraded version is in the works that can deploy via FTP.
The biggest downside to Delphi for PHP is that it still has a few quirks. During our demo, the Apache process stopped working properly, and they needed to use Task Manager to sort things out. This is a known bug that they are working on, and though minor, it is disappointing.
The interface is also a bit cramped in many places; it feels like there is a bit too much information on the screen. When I tried to rearrange the screen, I discovered that the docking of toolboxes is not nearly as slick as Visual Studio's toolboxes, and it took me quite a while to get the windows to dock in a way that I liked. In fact, it took me nearly 15 minutes to get the Tool Palette back into its original location after I undocked it. Also, there are icons on some windows that don't make sense and lack tooltips to explain their purpose.
I don't want to be too hard on Delphi for PHP -- it's only Version 2, and IDEs are extremely complex pieces of software. Visual Studio took about five years to become a really useable and useful product, so I can't ding the product too much for these things. Still, it would be good to see the kinks worked out soon, particularly the Apache bug.
Overall, I think Delphi for PHP deserves developers' attention. Even though it has some flaws, PHP developers really don't have any good alternatives. There is a reason, after all, that most PHP developers are using a mixture of so many disparate tools and have to wave chicken bones and dance in a grass skirt to do any kind of debugging work.
If you're a PHP developer who is sick and tired of the voodoo dance, give Delphi for PHP a shot. (Trial versions of Delphi for PHP are available.) The biggest compliment that I can pay this product is that, if I had used it the first time I worked in PHP, I probably wouldn't have stopped working in PHP. This is a serious compliment coming from me.
J.JaDisclosure of Justin's industry affiliations: Justin James has a working arrangement with Microsoft to write an article for MSDN Magazine. He also has a contract with Spiceworks to write product buying guides.
---------------------------------------------------------------------------------------Get weekly development tips in your inbox Keep your developer skills sharp by signing up for TechRepublic's free Web Developer newsletter, delivered each Tuesday. Automatically subscribe today!
Justin James is the Lead Architect for Conigent.