Web Development

CodeGear's Delphi for PHP: Initial impressions

After seeing a demo of CodeGear's Delphi for PHP, Justin James describes his favorite features as well as the product's drawbacks. Find out if he ultimately recommends checking it out.


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.

Most people familiar with PHP development will recognize this situation. For whatever reason, PHP never really ended up with a truly integrated, visual development platform. CodeGear decided to make one that was similar to its existing offerings. To do this, CodeGear engineers rewrote the Visual Control Library (VCL) in pure PHP and reworked the Delphi IDE to work with PHP. They also integrated an installation of Apache to complete the circle of end-to-end development. The controls are AJAX-y, and with the VCL, there is no need to know JavaScript to leverage this functionality.

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.

My verdict

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.


Disclosure 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.

Chaz Chance#
Chaz Chance#

When the original Delphi came out, it wiped the floor with the competition, and after just a couple of hours experimenting with it I became a convert. It integrated so many things, placing so many tools at the hands of developers without needing to start different and possibly incompatible programs. From this review I would say that they have done it again. Okay, IDE's are so commonplace now that many readers will never have used anything else, but just look at what has been integrated. There is everything I can possibly think of to write, debug, test and deploy PHP programs, all in one box. A few bugs? Well, I remember VB, VB3, VB4.... do I need to go on? I write code that pushes the computer to its limits, so I am no stranger to using Task Manager to kill a process or two. I have been thinking of adding PHP to my skills list for some time, but I wasn't sure where to start. Now I have no excuse. I am definitely going to download the trial. Thanks for this very useful review.


Mister Justin Timbrlake James and PHP : the grandmather and the machinegun. Have you ever heard about Zend Studio ? What about Eclipse PDT (PHP Development Tools) ? For your info, you can even use Dreamweaver for PHP programming.

Justin James
Justin James

Have you used Delphi for PHP? If so, how do you like it? If not, does it sound like something that you would be interested in? J.Ja

Justin James
Justin James

Chaz - Glad the review helped you! I had the same experience with Delphi that you did. I had just encountered visual IDEs a few months before with VB 3 (they came out around the same time), Delphi was so good, I spent my own money (I was a poor college kid in those days) on an academic Delphi license, even though I was only using it for personal projects. I still have that CD around somewhere I think, too. :) PHP itself is a fairly easy language to learn... it's a C-style language, and is extremely similar to Perl in many ways (it originally started as a Perl module before morphing into a full fledged development platform of its own). J.Ja

Justin James
Justin James

I am well aware that there are other tools for PHP development out there. Did I ever say that there weren't? It just seems like most developers still aren't using them, which means that the market has plenty of room for one more. In terms of comparing Delphi for PHP to the other choices out there, that is difficult for me to do since I do not use those other IDEs out there. If Zend and Adobe are interested in having me review their products, I would be delighted to do so. The last time I evaluated Eclipse (about 2 years ago), I did not see any PHP functionality available for it, but I would be willing to take another look at it in a few months. J.Ja


I did test the first version when it came out and I was not too impressed. My greatest worry was the deep inheritance hierarchy that really had a degrading effect on server performance. I did really test some small applications using our server and rejected the product quickly. Things may be different using/tuning a PHP accelerator of some sort but that is not possible if your customer is using a shared service. It is a well-known fact that heavy OO really makes PHP crawl. Using my 3GHz P4HT for testing the app in the development environment felt like swimming in a pool filled with tar. Another problem is that in order to be able to continue developing the site/application started with Delphi for PHP one is practically stuck with the product, even though there might be nothing wrong with it. I have used an MVC approach for five years using Smarty compiling template engine together with a lightweight set of classes and they perform A LOT better. Moreover, I can send the templates to my graphics designer who then makes the application shine without any external tools needed. Just Notepad (or Dreamweaver etc if the guy is using it).

Editor's Picks