PHP/CFML Server Comparison

July 26, 2009

I've been putting together a document on the difference between running a CFML application in the Enterprise compared with a PHP application, to show to clients. I should stress that client's aren't really bothered about the language benefits to the developer only about performance versus server costs. This list is based on running an enterprise level application.

This is my initial document. I'd be interested to see if anyone has any objective thoughts. PHP and CFML developers welcome!


PHP 5 on Zend Server Community Edition

Pros

Free
Multi Platform
1
Widely used / Large Developer base
Support for Objects

Cons

Not suitable for enterprise "The community edition of Zend Server is a free, simple PHP Web Application Server environment that is ideal for running non-critical PHP applications or just for experimenting with PHP."
2
No built-in page caching
No built-in monitoring
No built-in diagnostics
No built-in optimization, acceleration (caches compiled templates)
No support for clustering (session replication etc)
Does not have clustering Support (based on the share nothing principle)
No native integration for .Net, Corba, Exchange

PHP 5 on Zend Platform Enterprise Solution

Pros

Built-in page caching
3
Built-in monitoring
Built-in diagnostics
Built-in optimization, acceleration (caches compiled templates)
Built-in support for session replication in a cluster
Multi Platform (Performance on Windows is not as good as Linux)
Widely used / Large Developer base
Lots of open source extensions
Support for Objects

Cons


Cost £1,033.50 - £2,763.22 for 1 year subscription
4
No native integration for .Net, Corba, Exchange
No native support for remoting for: Flex/Flash/Ajax/Silverlight/JavaFX
Caching is basic
No in-built enterprise search server

ColdFusion 8

Pros

Built-in caching
Built-in monitoring
Built-in diagnostics
Built-in optimization, acceleration (caches compiled templates)
Built-in support for clustering (includes session replication)
Multi Platform Support
Native support for Flex/Flash/Ajax/PDF
5
Native support for AMF/JSON/XML
Native Integration as middleware for .Net, Java, Corba, Exchange, Webservices
Native Support for clustering (shared sessions etc)
Built-in enterprise search server
6
Support for Objects
ColdFusion can run PHP code although doing so would have minimal advantages
7

Cons

Cost £1,022.35 - £5,886.85
8
No native support for remoting for: Silverlight/JavaFX
Not as many developers as PHP
Caching is basic
Object instantiation is slower than PHP

ColdFusion 9

Pros

Built-in caching
Built-in monitoring
Built-in diagnostics
Built-in optimization, acceleration (caches compiled templates)
Built-in support for clustering (includes session replication)
Multi Platform Support
Native support for Flex/Flash/Ajax/PDF
9 
Native support for AMF/JSON/XML
Native Integration as middleware for .Net, Java, Corba, Exchange, Webservices
Native Support for clustering (shared sessions etc)
Uses Hibernate
10 for Persisted Entities so Java performance
Fine scale caching stratergies
Built-in enterprise search server
11
Support for Objects

Cons

In public beta
12
Costs unknown
13
No native support for remoting for: Silverlight/JavaFX
Not as many developers as PHP


  1. Performance on Windows is not as good as Linux
  2. source: http://www.zend.com/en/products/server/#Performance
  3. source: http://www.zend.com/products/server/
  4. source: http://shop.zend.com/eu/zend-server.html
  5. Flex/Flash and PDF are Adobe products.
  6. Verity K2
  7. source: http://corfield.org/blog/index.cfm/do/blog.entry/entry/ColdFusion_8_running_PHP
  8. source: https://store2.adobe.com/cfusion/store/index.cfm?store=OLS-UK&view=ols_prod&category=/Applications/ColdFusionE&distributionMethod=FULL&nr=0#category=/Applications/ColdFusionE&loc=en_gb&view=ols_prod&store=OLS-UK
  9. Flex/Flash and PDF are Adobe products.
  10. Hibernate is an open source enterprise, ORM library for Java
  11. Uses Solr, an open source enterprise search server for Java.
  12. Due for launch 2009
  13. Expected to be similar pricing to ColdFusion 8

7 comments

  1. Ok....

    1. Database was never mentioned (although this could of been on purpose).
    2. Native support for Java exists in both versions of the Zend platforms and is called the Java Bridge & makes it very easy to leverage it in the code.
    3. CFML is compiled into Java bytecode. (hint: why not just use Java?)
    4. CFML is owned and supported by a company better known for the creative tools rather than server platforms. (I liked it better when Allaire owned it personally, at least they were.)
    5. CFML may not even be around much longer and the developer base is nearly non-existant.
    6. If you are going to use the out of the box Zend platform, no it does not have those things, but it very easily could (Memcached, etc...).
    7. Forgot to include the capabilities of your average PHP framework (CodeIgniter is my preference but they pretty much all provide many of the things you have said are not available.)
    8. There are so many things available to the PHP developer it would make the 10 times more productive. (The LAMMP platform altogether actually, extra M for memcached).
    9. I could sit here all day but I'll leave it at that.

    ***Please note I am platform agnostic, I work with the MS, OSS, and Java stacks regularly although it has been awhile (ColdFusion v4/2001) since I've worked with ColdFusion.

    Good luck!

    Comment by Gregory Kornblum – July 26, 2009
  2. Very interesting list of pros and cons. Certainly something useful to pull out in client meetings when the usual question of why we don't use PHP is asked.

    Comment by Andy Beer – July 26, 2009
  3. It would have been very cool to also have Railo ( www.getrailo.org ) compared, because the big pro is: FREE.

    Comment by Charlie – July 27, 2009
  4. @Gregory, thanks! Excellent feedback, just what I had hoped for. I tried to just compare the server platforms from a client viewpoint. Let me respond to your points (without starting a flame war - you've picked me up on a few PHP things)

    1) I didn't include database connectivity as the client would just expect whatever language/platform to be able to connect to a database and not care how.
    2) I didn't know that about native Java support for PHP, very interesting.
    3) I don't think a typical client is interested in how your code "makes magic happen", unless it affects performance.
    4) There is a CFML Advisory Committee made up of members from Adobe, Railo, Open Blue Dragon and a few independent folks which is responsible for defining the CFML language.
    5) The developer base is small compared to Java and PHP that is true, however I fail to see why Adobe would buy and invest in a dying product that costs money. If if was that redundant it would have died a long time ago.
    6) Both ColdFusion and PHP can be extended with 3rd party frameworks so I didn't include them. Knowing that PHP has a Java Bridge certainly opens up a lot of potential in PHP that I hadn't realised before.
    7) Yes, ColdFusion has plenty of frameworks as well. I've used CodeIgniter in the past and quite like it although the ORM support is a bit limited.
    8) Well if developers of any language learnt ANT/make, SVN/GIT etc, we'd all be more productive :)

    Seriously thanks for the comments Gregory. As developers we can get a bit blinkered in our views, so it's always good to hear other views. ColdFusion has certainly moved on since 2001, and the community now has two free engine (Railo and Open Blue Dragon) which I didn't include for various reasons but is well worth a look.

    Comment by John Whish – July 27, 2009
  5. @Charlie, yeah - I would've really like to include Railo. I have got it up and running, but the docs are a bit sparse at the moment, although I know this is being worked on. One of the things that really interests me about Railo (other than the price) is the extensions. Being able to get the Railo guys to extend the engine for a specific need is potentially very powerful.

    Comment by John Whish – July 27, 2009
  6. Great list! Thanks for putting together a fair, objective list.

    Comment by Richard Davies – August 03, 2009
  7. I had to chuckle at Gregory Kornblum's suggestion (#3) to just use Java because ColdFusion is compiled into Java bytecode... I wonder if he writes all of his programs in machine code because that's what PHP and Java bytecode all eventually get translated into. ;-)

    Comment by Richard Davies – August 03, 2009

Leave a comment

If you found this post useful, interesting or just plain wrong, let me know - I like feedback :)

Please note: If you haven't commented before, then your comments will be moderated before they are displayed.