HOME BUILDER
JAMES HEIN
As a long time Delphi and Borland product lover I spotted something I had not seen before, Delphi for PHP. We have covered PHP in the past and some time back, Delphi, so the combination of terms intrigued me.
Delphi PHP Comes from CodeGear (at http://www.codegear.com). The aim is to provide a nice IDE (integrated development environment) for PHP developers that would match the speed Delphi developers enjoy. Version 1.0 came out in February 2007, and Version 2.0 has just been released.
The term "Delphi" in the title is a bit misleading and the term really refers to the IDE style it has tried to achieve. So you have a Windows IDE that comes with a PHP 5 class library based on a SourceForge project and the result is a third-party product that Delhi users will feel familiar with.
The installer sets up your complete PHP test environment that includes a local Apache 2 server, a Nusphere debugger and listener, and a reasonable editor. A profiler is included and it has of course a visual component library (VCL) made famous by the original Delphi.
You can drag components onto a visual form designer, set properties, deal with events and interact with data components like Database, Datasource and Query. There are some data-aware controls like a datagrid along with the usual components you would expect to find, and HTML editing is included in Version 2.0.
On the down side, while there are lots of components the documentation is poor and sample apps are scarce. Various sources are used for the components so they are not always consistent. This version allows you to add HTML directly, but migration is not that easy.
All in all this is perfect for quick and simple PHP projects but may not stand up to more complex and business-level ones for which say the Zend Technologies Framework is a better choice. Not sure where this one will go in the future but it could be an easy option for those who want to implement PHP without all the hard coding.
On the subject of IDEs, I'm finally starting to come to grips with Visual Studio 2008 ASP.NET programming. You need to do a lot more coding than I ever needed to using Delphi's IDE, but C# is easy to move to if you have any C or C++ experience.
One piece of advice for those using a Datasource where you want to have the stored Procs. or SQL generated for you. You must have a primary key and if you don't there is no warning other than the Update and Delete element not being generated for you. To date, I still find VS 2008 quirky but if you want to build web sites and take the time to learn it, as a programmer VS 2008 is very powerful.
You want a menu? Just drop add a site map, edit the XML to reflect your desired structure, add a SiteMapDataSource and point your Menu to it. Make this a master template and you have your common menu structure defined for every page that can be adjusted by simply changing the XML. You want a drop down list in your Datagrid that uses a foreign key? Prepare to spend a lot of time reading a lot of articles, don't bother with the books, none of them seem to cover this kind of thing. Same thing in a Delphi Grid? A few drags, a few clicks and you're done, so MS still has a lot of catching up to do.
The power of the event model in VS is impressive but sometimes quite complex and not always logical in how you use it. My biggest complaint to date is there is rarely an easy way to find out what the correct collection name to use is inside each event. The code helpers are more intelligent than in VS 2005, but do not always work. I can however start to see the attraction of VS development. If you want to start, you might as well dive right into C# coding instead of VB, but that is of course not essential. And as with any development environment, you can produce rubbish results if you do not pay attention to the basics.
Email: jclhein@gmail.com.
Prev
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Next