If you read my blog about the CodeRage conference last month, you'll remember that I got really excited about the new "Delphi for PHP" product. It looked like it would revolutionize web development.

I *finally* had time to install D4PHP today and start playing with it. And it's probably not a big surprise that I am *horribly* disappointed. I've been duped again by snazzy presentations and hype.

The problem is that it's a toy. It makes some interesting demo applications, but it doesn't have even the *basics* of web layout and design for serious real-world applications.

For example, consider a main page of a web site: header along the top, navigation along the side, and the rest all content. Really basic Web 101 stuff. A layout you can easily create with just a couple of DIVs and CSS.

In Delphi, there is a Panel component. I had expected to place 3 panels on the form, set one to align to the top, another to align to the left, and another to align to the "client" (the rest of the space). But unlike normal Delphi, D4PHP Panels do not have an "align" property.

In fact, *none* of the visual components in D4PHP have an Align property, except for Frame and Framesets. But using Frames is a horrible way to do this. We've been past using Frames for years now. Did the people who designed this know nothing about modern CSS design?

The Panel component is actually a wrapper for a TABLE, rather than a DIV. But even a TABLE has more control that D4PHP exposes in the properties.

Also, the lack of documentation is appalling. The help file is useless. When you click on a property and press F1 for help, you get a page that basically says "this is a property of xxx". No information about what it actually does.

So much for visual PHP design. I had really hoped to use this tool to create the new area on our web site for Affiliates. But D4PHP was released *way* too early. It's an interesting concept, that maybe will be useful in a couple of years. But it's basically impossible to use it for serious web design right now.

It's back to Dreamweaver for me now. I just don't have the time to mess with D4PHP. It was supposed to make PHP development faster, easier, and more visual. It currently does none of the above.

From the way you were talking about it before it sounded a lot like ASP.NET and that perhaps they'd come up with the concepts of everything that's in that before hand especially as you said someone from Delphi had defected to Microsoft. From the way you are talking now it unfortunately sounds like they are trying to play catch up with ASP.NET :(

It looks like they just bought something from a company called "Qadram" and use their components as the "VCL". The Delphi-like IDE is very nice, and that seems like the part added by CodeGear. But the Qadram components seem to be where more of the problem lies. Supposedly you can create your own components for the VCL, and the VCL is open source, so it's possible that, over time, other people might add better components. For example, it would be great to see wrappers around the Yahoo UI within the VCL.

But since the documentation is so poor, it's going to be a challenge for people to figure out how to do something like that. Their architecture for it seems pretty good, but I don't know how much attention it's really going to receive in it's current state.

Not sure about the ASP.NET comment (since I've never done anything with that). I'd call this more like Visual Studio with PHP instead of C/C++/C#, and with wrapped Javascript components for the visual elements. They call it "Delphi for PHP" because it has the Delphi-like IDE, debugger, etc. And it *is* very nice to debug PHP scripts locally. They include an Apache server, so it can run your apps locally in your browser and debug them. For example, you can set breakpoints in the PHP code, examine stuff at runtime, etc.

So, like I said, the IDE is nice. It's the visual components that are lacking in their sophistication. They definitely didn't pick the "best in class" Javascript framework to base this around, although I guess the Qadram stuff is probably the closest to a "Delphi-like" set of components they could find.

Everything you said there is exactly what ASP.NET is. Web page programming in Visual Studio using VB or C#, I think more languages are available in the bought versions, you slap standard components onto the form and they are rendered as sensible html elements with javascript in the mix, it's even better now they have Atlas so you can do true AJAX stuff. You can create your own user components very easily, there is full support for master pages and theming. All of this is done from the IDE with full debugging, breakpoints etc., running your development in a local web server which isn't reliant on you installing IIS although it is needed in the final production environment.

The cool thing about this is you can make a start with it for free by using Microsoft Visual Web Developer 2005 Express available for download at MSDN.

It's more than likely everything you were hoping for from D4PHP except for not being able to write the pages in Delphi.

Well, and the fact that it's ASP code instead of PHP code :) I used ASP a long time ago, but switched to PHP so that I could run the site on either a Windows or Linux server box. I'm not planning to go back to ASP any time soon, although it's nice to hear that ASP.NET is so good. Sounds like this is probably what CodeGears is trying to compete with.

Hmmm, I wonder if you could get away with developing under Windows with VS and then using Mono to put it on a Linux box. The site says "Mono allows your existing binaries to run on Linux with copy-deployment." but I suspect this probably only applies to WindowsForms binaries.

Hmmm, I wonder if you could get away with developing under Windows with VS and then using Mono to put it on a Linux box. The site says "Mono allows your existing binaries to run on Linux with copy-deployment." but I suspect this probably only applies to WindowsForms binaries.

I doubt that. As long as no native code is included it will probably work. For example I can run C# applications using Mono that I have compiled using VS, but C++.NET doesn't work because it includes native code.

Also if it doesn't work you can actually install Mono on Windows XP, and use the Mono compiler :-).

The thing is the latest VS doesn't compile webpages, you just deploy the aspx page and the code behind and it compiles when needed, you can at least force a compile before hand to create your dll though, or perhaps you can deploy as is under linux and mono will compile as needed too.

Zugg wrote:

I'm not planning to go back to ASP any time soon, although it's nice to hear that ASP.NET is so good.

Now that they've properly implemented AJAX check out some of the goodies you can have if you get the AJAX Control Kit too.

_________________Taz :)

Last edited by Taz on Sat Apr 28, 2007 11:46 am; edited 1 time in total

The thing is the latest VS doesn't compile webpages, you just deploy the aspx page and the code behind and it compiles when needed, you can at least force a compile before hand to create your dll though, or perhaps you can deploy as is under linux and mono will compile as needed too.

I just rembered that there's a project where they have made a php->asp.net compiler: http://www.codeplex.com/Phalanger ? I wonder if there's any performance gain. Has anyone tried it and compared the running speeds?

Just a quick Hip, Hip, Hurray to you for all the hard work thus far. We all appreciate. Also wanted to make sure that all was well in Zuggland. Might just be me, but responses from Emperor have seemed fairly light lately.