Is Delphi for PHP better than Delphi 1.0?
Eric Wilms of WilmSoft.com left a comment on an ealier post. My reply was way to long for a comment, so I’ve turned it into a post. Then I can get other people’s feedback. I’ve found people rarely ever read the comments here since most of my posts show in full on the front page…
Let’s catch you up on the story so far…
Eric wrote:
I’ve got the first release of Delphi 4 PHP… I have to say I’m VERY disapointed… I’m a Delphi code since Delphi 1 and PHP programer since 1998 and the thought of a Delphi for PHP was a dream come true. However, I can’t not get it to run any “app” on my Hosted server. The code runs fine on my local machine but, that’s not where my web sites are hosted. I HAD to upgrade to PHP 5.X.X.X in order to even get anywhere on a simple Hello World. I have no issue with that execpt it’s not really mentioned anywhere in the specs… Also, I was completely dumbfounded to find that there was NO FTP built in to Delphi 4 PHP… Come on guyes! You have to “delploy” you project (which puts all the files you’ll need together in one spot then open up your favorite FTP program and copy them to where you want it…. So, that means a simple change is not a click of a button away to update… you have to click deploy and about four “next” buttons to have it “deploy” THEN open your FTP and copy the files to the server…. That is a Joke.
Just calling it Delphi and hoping it will change the way things are done (Like Delphi ONE did) will not change the way things are done. I’m back to hand coding in my Favorite PHP editor. At least when I hit save, it saves it via FTP back to the server it came from….
I wish I could get my money back…
To which I said:
Well, I do understand where you are coming from.
But I can’t say that either of those two things were not issues for me. I usually use PHP 4, but php 5 was always there for me to enable with a simple .htaccess change. Your past that anyway.
As for the FTP setup, I agree that would be nice too, but I don’t need it either as I use the old Novell add on util NetDrive ( abandonware publicly distributed for free to students) to make my debian webserver’s root drive X: on all of my machines, even my laptop. There are a bazillion instruction pages at colleges and elsewhere explaining how to use it, but I really don’t think you need it. Here’s one set http://www.loyola.edu/5555/netdrive/installingnetdrive/
I know lots of people use similar solutions so that their FTP account is just a drive letter on their windows sever. Maybe it will help the transition for you… The public goal for Delphi for PHP v1.0 was always a Delphi 1 level of ability. It’s surpassed Delphi 1 in MANY, MANY ways, but I can’t deny there are some rough spots that require attention.
And Eric wrote back (OK this is the last quote):
I’m curious (and a die hard Borland….er ahem… Code Gear fan) what do you see as: “It’s surpassed Delphi 1 in MANY, MANY ways, ”
Because for me and Delphi one (coming from VB) was I Dropped down a button, a label and pressed F9. Bam! done… And every thing from “hello world” to middle-ware client server app doing OLE (or what ever) was just as hard (or simple).
I Dropped down a Calendar in D4PHP, do the deploy, copy the files to my server and I get: “Warning: require_once(vcl/jscalendar/calendar.php) [function.require-once]: failed to open stream: No such file or directory in /home/wilmsoft/public_html/delphi/vcl/vcl.inc.php on line 127″
Is that a rough spot? Do I really have to dig in to the source code to figure out what’s missing the vcl.inc.php file?
I hear what your saying about the FTP and figured that would be the general response. But, I’m a contract programmer. I never am “on the server”. I almost always am on someones remote server where I don’t have access to a simple .ini file. I can’t use this tool and make money as it is today. I made money DAY ONE with Delphi One. No telling the customer oh, I’m glad you hired me to fix such and such but, I need you to now use change your infrastructure so my tools work.
I thought (or hoped) that the code gear spin off would start to focus (again) on the little guy writing code not the corporations… and I do see that trend and felt like I need to preorder D4PHP. But, Code Gear bought Delphi 4 php and I think it’s going to take a few releases to get it where they want it. Version one is not there yet. I wish I would have waited for the demo before I put down my money….
And this may not be the place for this conversation but, I couldn’t find any place on Code Gear’s site to vent. I am interested in other peoples view on this potentially awesome product.
So there we are. This is my reply…
Well, first off, “How does Delphi for PHP surpass the Delphi 1.0 feature set?” I’m not going to be able to give you a exhaustive list in without giving it more serious thought, but I can rattle off a quick ten ways Delphi for PHP is improved over Delphi 1.0:
- Code completion springs instantly to mind. Delphi for PHP’s use of code completion is hindered compared to current Delphi versions because PHP is not a strongly typed language. But, there was nothing to compare to it in Delphi 1 AFAIR.
- Datamodules are another addition. They were introduced in d3, I believe, and take the clutter off of your design forms and allow you to share the database structure across various forms.
- If you deployed BDE apps in D1, you should remember that the end user had , until the setup programs caught up. That’s handled for you, though here too there are technical difficulties on the D4PHP side. So perhaps this one is a wash…
- The Code explorer didn’t exist in Delphi 1. You couldn’t easily go between unit and unit. As far as that goes I don’t think Ctrl-Enter worked to open the unit from the uses list either.
- Project Groups have been added allowing you to have several projects on a single website.
- There are numerous more advanced controls in the tool pallette AND a way for the community to have input and an affect on the behavior of these controls.
- The applications you produce are themed, that certainly wasn’t the case in Delphi 1. Delphi 1 apps didn’t even minimize in quite the same fashion as other Windows Apps. Because of TApplication IIRC, your main form wasn’t REALLY your main form and you had this double minimize thing going on.
- The Data Explorer and all of its numerous features certainly didn’t exist.
- Internationalization (I18N) was in its infancy in Delphi 1 days.
- Pinning, expansion and restoring of the debug & development “windows” in the IDE allow you to have a much more dynamic IDE than was ever possible in D1.
I’m sure there are plenty of other things to add and the list can be debated, but if you install Delphi 1 again, you might be surprised at the feel of it compared to what we have in today’s delphi. I was when I did just that last year.
Now I do agree that saying that Delphi for PHP had “Rough Spots” might be a bit rosey. I also agree that Delphi for PHP could have baked for another month in the oven. If it would leave a better taste in everyone’s mouth after the first bite. But if you have more than a day to look at this stuff, you find that there really is some worth here, but it is a paradigm shift that takes some getting used to. Somethings work really well and somethings… not so much. D1 was not much different if you got in early enough. The whole concept of design time libaries and run time libraries and deploying artificially thin EXEs had everyone pulling their hair out for a while.
With Delphi for PHP, there’s another hurtle to over come. You are switching from a Native API design environment, into a designer that IS a webrowser and javascript interpreter. In order to have live components, the designer now has to execute all of that web code. So there is a significant speed cost to that. The equivelent would be writing a Delphi app that would use a TWebBrowser component to load rich web pages again and again and again.
I’m not sure I understand the logic of the one day trial idea in this sitation. Nothing makes people crankier than a ticking clock, working with something never seen before, things not working right, and a significant money decision on the line. I’m not sure combining all of those issues into one program was the key to success when taking API developers and putting them in a web environment for the first time. But…that’s the situation.
There are definately things that you can do to make your situation better. First, I totally agree with you about the calendar thing. I logged an issue for it here:
Report No: 43501 Status: Reported
js Calendar does not deploy with the deployment wizard
<a href=”http://qc.codegear.com/wc/qcmain.aspx?d=43501″>http://qc.codegear.com/wc/qcmain.aspx?d=43501</a>
ALL of the javascripts should deploy with the rest of the application.
Now that said, there is no reason that you can’t have the full VCL directory already deployed on your site and in that directory.
I’ve actually taken that one step further. I have ONE copy of the VCL for PHP for all of my websites. I hung it off of my web root. I allow my Delphi for PHP apps to access it by creating symbolic links in the directory containing the Delphi for PHP files. Just put the VCL up there in your root (or wherever) and then telnet/ssh into your account, change to a different directory and then run these two lines:
ln -s ~/vcl
ln -s ~/vcl vcl-bin
The vcl-bin path is required for images used in the components. There are other ways you could do this too. You could just link the vcl-bin for example and then have a custom PHP.INI file in your directory that adds the vcl to your include path. This solution, though, I think is the most generic.
When you have this done, you should never need to deploy your app again, and can just create a batch file that multi sends only your stuff to the website. I’ve not experimented much with this solution, but it seems to work fine with all I’ve done with it so far!
The logic behind the 1 Day Trial is the same as the one behind releasing Delphi 2007 and Delphi for PHP before they were ready: make some cash flow in the first quarter. CodeGear figured that if people had 30 days to try Delphi for PHP then they wouldn’t be buying it before the 1st quarter ended…
It’s sad to see CodeGear so much focused on revenue issues and not keeping up with their motto of “where developers matter”. Unfortunately, CG is a company like any other so they need to make money. They could, however, have chosen a more true motto. Not that, the people at CodeGear won’t do everything in their power to help you with your issues, but it would be much better not to have so many issues to begin with, especially when they are caused by rushing out incomplete products which still come out with quite a few number of easily identifiable major issues that result from rushing them through the door to make money in the first quarter…
For my complete thoughts and experience with my first few days with Delphi for PHP, go here – http://delphi4php.blogspot.com/2007/03/delphi-for-php-my-first-project-and.html
Overall, excited and disappointed. Although I did expect problems in the 1.0 release, and fully expect CG to rapidly address the issues, I find myself having to mine thru code libraries to locate errors — code which I have not written, and some of which is a bit complex. Nontheless, lets face it — this tool will fundamentally change the way us non-microsoft developers create web apps, and I am looking forward to the future of this product.
Is it better than Delphi 1. Hard to say — I think YES, because there is nothing to directly compete with it (whereas with delphi 1, there was VB).
Very good points. Your right about D1 in general. I guess I was looking at D1 “back in the Day” and D4PHP, today. Yes, I will give you a program written in 1995 does not compare with a program released in 2007.
Yep, D1 didn’t have the code completion etc.. But, fast forward to 2007. there are tons of ASP and PHP ide’s out there. The PHP editor I use today does have code (well, function) completion. And it has a built in FTP for deploying.
Dreamweaver is another program that does all the MySQL/PHP building. They don’t call it a Data Unit but, can just drag and drop the field and it builds all the code. Just hit save, and it’s out on the net. Delphi4PHP does not have VB to complete with but, there is competition…
For the record, I’ve emailed CodeGear to ask for my money back… I’ll WILL buy it when it’s click and deploy. I’m not debugging it for them. I don’t have time/money to do that…
I do agree that the deployment wizard needs to be improved. I personally wish it had a mode to just deploy all the files in the current directory and not any the vcl or that there were tools that you could add to the IDE that would allow you to run the batch files to do the deployment that way. It’s not hard to create a shortcut to a link on your start menu that does that, but it’s not quite ideal to do it that way. Anyway, I hope the next release is soon and solid. I’m sure you’ll hear about it when it is here!
Delphi 1.0 was so long ago that I can’t remember how good or bad it was. I’m not too disappointed with Delphi for PHP, because it does some wonderful things that I would not have been able to do myself without a huge amount of effort. However, there is at least one major issue with it.
Lack of FTP functionality should not be an issue. Anyone who builds web sites should already have FTP software. As for documentation, isn’t it almost always useless? But something that CodeGear and/or Qadram seem to have forgotten is that their customers won’t necessarily be familiar with either PHP or *n*x systems. As we’ve seen with the input filter issue, it is all very well to supply a working version of PHP with the IDE, but if you are developing code for deployment you may already have a local test server and you certainly have a host server. Both of those need to have PHP configured so that the VCL can run. That’s something that users may not know how to do. In my case the fixes to the VCL mean that I’ve been able to get the VCL running on my own (Windows-based) test server, but I still have no idea what to do about my host because they are still on PHP 5.1.1, which needs the input filter extension installed, and is on a *n*x system.
Hopefully there are people at CodeGear/Qadram running around trying to fix such issues, but in the meantime us guinea pig users are reliant on folk like you who know what you are talking about for advice.
By the way, I’m an enthusiastic WordPress user and when I can finally get the VCL running I’m eager to see what I can do for WordPress with it.
So, a few weeks have gone by and I’ve played a bunch more with Delphi for PHP and the bottom line is it WILL be very cool. It’s not even close to there. The other thing is IF they stay at the $250 mark. It will be much cheaper the a lot of other AJAX IDE’s… but, I do a LOT of PHP and Delphi Code. You’ll take Delphi out of my cold dead hands.
But….. Delphi for PHP is a long way away from MY PHP editor…. Look telling me that “every web master will have an FTP program” is like telling Kettering that every Mechanic who drives a car should be able to crank start it by hand. Thus who cares if the some cars have an electric starter.
I’m not going backwards to an IDE for PHP where there is a bunch of extra steps?!?! FTP is built in to the Free-be IDE’s. Click, load from remote site, edit, save… done. Not click deploy, click-yes I am ready, click-next, click-Finish… Open FTP, Click open, site, find deploy folder, click to save…
Yuck! All I hear is my customer saying, “what is taking you so long?”
Then, and this is BIG…. Have you seen the help file??!?!?? Here is a sample:
“Description
DBGrid class
A component to show a dataset in a tabular way”
Really? A component to show a dataset in a tabular way… well, NOW I get it!!
Where’s the samples?! I learn by reading others’ code. Boland was the best at it!!! Now, they ran it through Doc-O-Matic and said “Ship it!”….
I’m warming up to Delphi for PHP but, only as entertainment. I’ve clicked and dragged a DB and created a grid… Slick, Slick stuff! (I’m STILL tring to figure out how to put a grid in “insert mode”, I’m figuring it doesn’t do that, but damn it SOME help in the help file would go along way)…
Again, it’s a premature release. No amount of: “well, it has code completion” will change that fact. I’m a die hard fan of Delphi… I’m just facing facts.
Eric, I have to say that I can’t disagree with a single fact you’ve listed. It seems a fair and balanced observation. What we need to watch now is what CodeGear does to follow up on this. I believe that’s the question of the hour. I just hope it is answered this hour rather than the next.
After this weekend, I’ll have completed one after hours project and I should have time to devote to some web apps and I plan on growing some of my sites again like D4php.com. Delphi for PHP should enable me to do some fun stuff. I’m sure I could do it without, but using Delphi for PHP, I’ll get my self further into that mindset.
I will point out for those that don’t have the product that there are 52 example projects of various degrees of difficulty available in the VCL Projects directory, but Eric was looking for code examples in the documentation. So, that doesn’t dispute his point either.
your exactly RIGHT! The die hard fan of delphi in me has faith that they will indeed come through.
Then “we” will be light years ahead of our competition who somehow can make sense of VB and ASP’s crappy, crappy langage! (I lose money every time I take one of those jobs!!)
There IS a reason Code Gear picked PHP for this endeavor!
And yes, there are examples… And they do work!
Well, they work in the IDE. And I can now get them to work on my test server. As for live, I still haven’t managed to find out how to activate the input filter on my host site. Lack of FTP tool, crappy help, these things I can deal with. Example code that I can’t get to run is irritating.
Yes, Cheryl. I forgot about that complaint… Here is the fix
“That means you don’t have setup the Input Filter PHP Extension in your system, if you don’t need to get input filter, you can edit your system.inc.php, and search for “throw new Exception”, around line 226 and remove safely that line”
Cheryl, look for the error message in the VCL. There’s a comment there that says basicaly “If you don’t want to see this message on your server, comment out this line…”. Do that on the VCL on your server, and all will be fine.
It’s in System.inc.php. Here:
class InputFilter
{
function process($input)
{
//TODO: Our own input filtering class in native PHP code
//NOTE: Comment this line to don’t raise the exception an get the unfiltered input
throw new Exception(“The Input Filter PHP extension is not setup on this PHP installation, so the contents
returned by Input is *not* filtered”);
return($input);
}
}
That takes care of the issue.
Maybe Mr. Anderson will wander by here and provide a link to his alternative fix…
But what if you do what the input to be filtered? Color me clueless, but isn’t there a reason why the PHP folks would have that filter, and have made it standard in the latest release? I don’t mind doing without it for testing, but live is another matter.
Then use Nathon Anderson’s alternative System.inc.php file. It provides and alternative filter method if the first one fails. You can download it here: http://www.delphi4php-hosting.com/
OK, that sounds promising, thanks!
Do I take it from this that there is no easy way to add PHP extensions to a hosted system? I’d be kind of worried if I thought that the D4PHP folks were assuming that everyone who used the product had full control over their own hosting.
It really depends upon your host. If you are running on a shared Linux server, as I understand it, it is VERY difficult. For example in order to add Interbase support, you must recompile PHP. If you are running on a Windows system, you have alternatives. Because PHP/Apache can load Dynamicaly Linked Libraries at run time, you can just uncomment the line that refers to the DLL in question.
BTW this explaination bothers me a bit. It might not be correct. The inconsistency is that to a Linux system a .so file is the same thing as a .DLL. At least that is my understanding. SOOOooo, why is a recompile required? My guess is that “There is no such thing as a paradox” and therefore something I “know” is wrong.
How’s that for a helpfull answer? 😉
Hmm. I suspect that most commercial hosting services use *n*x systems of some sort. I know mine (Pair) does, and they are one of the market leaders.
Obviously if an extension isn’t installed at all then you are hosed. I was thinking more whether an individual account on a hosting service could point to its own PHP.INI file so as to be able to turn on the extensions that it wanted. Or perhaps you can do something in the .htaccess file that will change how Apache runs PHP. I guess I need to ask Pair’s support guys. I’ve just been too busy doing other things this week.
I just worry about the whole concept, because a $250 PHP product targeted at people who are Windows developers is going to leave a lot of CodeGear customers needing to understand how PHP and Apache interact in a *n*x environment. And I’m afraid that when I try to get help from *n*x people I tend to get “we don’t want no pea-brained minions of the Evil Empire round here” answers.
Basically I want CodeGear to make it a priority to try to handle these issues for its customers, because if it doesn’t there will be a lot of frustrated users out there.
I would not say that Delphi for PHP code is targetted at a platform.
The code runs just as well on a Linux system as a windows system. There is a layer of indirection there, yes, but even your basic cheap hosting can run the Delphi for PHP apps just fine.
That said you get what you pay for. If you buy a $4.99 a month service with a MySQL server, you’re going to have a hard time talking them into loading a Firebird extension into PHP. That would be true, I suspect on Windows IIS or Apache just as it is under Linux Apache.
But Delphi for PHP targets the most common configuration, with the exception of this error, for which Nathan has suggested a fix.
It certainly shouldn’t be targeted at a platform, but if you need to mess around with INI files and the like to get it to run then you may need to know something about the environment in which you are running. Therefore I am sooo relived to see you say:
Here’s hoping it stays that way. And thanks!