Subject RE: Jumping in the wagon - some HIGH level thoughts...
Author Myles Wakeham
Interesting thread. And it brings back memories for me. But with the majority of questions relating to coding, frameworks, etc. it would seem that there are many missing higher level issues that haven't been discussed here. I would suggest that they are critical for anyone coming from Delphi and developing PHP applicatins, beside how to connect to a data source and frameworks, etc.

Here's a few things on the surface that are vastly different in PHP than in Delphi, particularly for someone who has any existing software development experience in Windows PC applications:

1. PHP development is designed for a 'hosted' solution. In other words, there is little protection around for your source code other than you controlling the hosting of it. This brings up issues that are much more sensitive with PHP development:

A. Offering hosting of the application for your customers - are you going to do this? If you are going to use a hosting company, can they provide you with the environment that will support the version of PHP you want, web server, Firebird, etc?
B. Source code security - although there are a few encryption products out there that will scramble your PHP source code if you give it to the customer, the jury is out on whether they create an unworkable performance issue, or are truly secure from what I have seen. You have to be comfortable taking on the fact that you may give your customer your source code entirely if you give them the app to host
C. Platform - Windows, Linux, Mac? There is clearly a bias suggested by Microsoft that ASP.NET would be the way to go for web development on windows and IIS is therefore assumed.
D. Web server - Apache or IIS? Apache clearly is the favorite amongst PHP developers, and this also assumes that your web server configuration is under your control as you will need to ensure all the right MODs are installed, etc.
E. Browser compatibility - CSS, Javascript and plain ol' HTML has a tendency to increase your testing phases because you will need to test your apps with Mozilla and IE browsers to make sure they do what you intended
F. Integration with local PC applications - if you have routinely integrated your software with 3rd party CRM, Financial, MRP, apps or Outlook, etc. then the software isn't running locally on your computer anymore and you'll need to have a strategy for this in mind
G. Customer mentality - customers who are sensitive to who has their data have to be 'sold' on giving it up to a hosting company. You will get a lot of objections to overcome regarding your company stability, etc. that wouldn't be as critical when the customer has their own application & data in house.

2. User interface - Yes, AJAX is a step towards a better browser experience, but it isn't a PC Windows GUI by any means. It’s a lot of code, but try and develop a UI intensive application without involving Flash or Flex or something like that and you'll quickly see the limitations

3. Security - when you open your application up using standard PHP code and frameworks, you open yourself up to security attacks, vulnerabilities, etc. If Apache or PHP has a vulnerability found, you will be affected. If you code in a way that is open to security compromise, you will be affected. Your coding style has to consider security from the start in a much more intense way than Windows GUI development typically does.

So why do people go ga-ga over PHP? Its because to many users having an 'anytime/anywhere' web solution is worth losing a lot of the functionality of their Windows GUI counterparts, and for software developers they are willing to change their business models to a 'subscription' model rather than a 'buy a license' model and get a smaller but more regular income stream. But please keep in mind what you are giving up and how you will have to change your thinking on many things well before you worry about the code, frameworks, caching, etc. These 'higher level' issues need to be solidified in your mind and you must sign up to this different way of operating & thinking.

I did it years ago. About 50% of our business comes from hosted web applications we developed. And the demand is definitely higher for PHP than traditional Windows app development at the moment. Our apps are HUGE PHP applications - much larger than most you find, which means that we had to take a lot of input over the years and morph it all into our CI framework, etc. But if I had to do it all over again, I'd probably be more comfortable staying with Windows app development to be honest. For our style of business it is a much more manageable way. But that is us. Your mileage will vary.

As for Delphi 4 PHP, its not production ready yet. Just read comments on the Internet to have this backed up:

I suspect by sometime next year, it will be ready for prime time but Codegear definitely did release early on this one. They'll get it to a great point soon, but its not there yet.

Its interesting that Microsoft are really touting the power of .NET 3+ and the idea of developing a Windows application and literally 'flicking a switch' and making it a browser application. How much of this is true, I'm not sure - I'm not a .NET developer. But I've seen a lot of my competitor's products developed this way and they definitely seem to have addressed things that PHP development doesn't have in common with Delphi development. For a Windows PC application developer wanting to offer a web version of their application, the path of least resistence at the moment seems to be to develop in C# or VB.NET and deploy based on your target deployment device (windows, browser, mobile device, etc.). It’s a very attractive approach that you might want to consider. Unfortunately PHP development doesn't have a Windows PC app development 'partner' that allows you to have one code base, and multiple deployment styles. If there was one, I think 80% of my points above would be moot.

IT departments really seem to be hyping up using hosted software solutions over local Windows applications. Why? Its less work for them to manage it. But I think you will see a complete 180 degree shift in this coming up. The availability of less expensive terminal server type workstations, more powerful servers with multi-core processing, etc. and products like VMWare, etc. make their lives easier. And all they need is one bad experience with a hosted application company going bankrupt, etc. and they will be in the CFO's office fast telling them they need to be back in control of the applications again. Then you'll either be giving up the source code of your application so they can host them, or your demand for Windows PC development will increase.

I'm not trying to discourage you from doing PHP development, but coming from a Delphi development background these are typical issues that you need to embrace and come up with a strategy around before you worry about the coding style, frameworks, etc. I believe that you will need to start from these higher level issues first.

And please keep in mind that I AM a PHP developer much more than a Delphi developer. These issues above are things I have to face EVERY day I open my office door.

Hope this helps.


Myles Wakeham
Director of Engineering
Tech Solutions USA, Inc.
Scottsdale, Arizona USA
Phone +1-480-451-7440

Try our new Outlook Utility 'Split Personality'