Subject Re: [firebird-php] RE: Jumping in the wagon - some HIGH level thoughts...
Author Alexandre Benson Smith
Hi Myles !

Interesting post... thank you for your perspective.

Some comments below

Myles Wakeham wrote:
> 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

I will host the code, me, Artur Anjos and Henrique Meira (lead developer
from MDO project) have a hosting company specialized in Firebird
(, we host applications developed in PHP, Java and
some dedicated servers that runs Windows and hosts classic C/S app and
are accessed via TS (or go-global), so I have all I need in the way I
need with the control I need. As a hosting provider we have no defined
plans, we offer what our costumers want the way they want (PHP version,
apache version, firebird version and so on)

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

Mainly Linux, but could be Windows if one costumer has any special needs.

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

Apache, unless specially specified by the costumer for a good reason.

> 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

This is another point that I think using a framework is a good option,
I've read about some Ajax frameworks that is compatible/tested with
"everything", I'd like to hide myself from that, I love abstraction
layers :-)

> 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

At first the integration will be with my own software the database could
be hosted locally or reached over the Internet, yes I know the
performance problem, but from the little tests I did, it has acceptable
performance, and is a far more quick, versatile and powerful way to get
information than to call office by phone, and if this becomes a bottle
neck, replication will be used.

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

We will have 2 scenarios, one where all data will be local (from the PHP
script point of view) and it's a point that is already addressed, since
the costumers already have the database on my machines and use it trough
TS, the other scenario will be the PHP scripts accessing the database
remotely (or replicated locally if performance was not good enough). No
problem here.

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

I know this point, that's something I need to address from the beginning
and is one of the things I don't know if I know it well enough ! :-)

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

That's exactly my case :-)

> 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 think I already did it (and those limitations was the reason I left it
aside for so many time)

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

This is what I've heard... :-(

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

I've looked at Morfik too, this sounds good, but I have a fear that it's
to "new" technology, I'd like to use technologies that are in use on a
variety of app
s and that has real cases of success. Maybe in the future Morfik will be
a good choice for me.

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

You have very good points and arguments, but I think those trade-offs
are clear to me (maybe it will be more clear after some months/years of
work), but I know that those points are crucial, and was one of the
factors that hold me to jump in earlier.

> 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
> ============================
> Myles Wakeham
> Director of Engineering
> Tech Solutions USA, Inc.
> Scottsdale, Arizona USA
> Phone +1-480-451-7440

thank you for your comments Myles !

Alexandre Benson Smith
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil