Are you undecided about ColdFusion vs PHP

ColdFusion and PHP are two web programming languages that are commonly used in the world of web development.  Both of these languages are very powerful languages, but there are are a few key differences between the two.

To begin with generalizations, ColdFusion servers are mostly Adobe ColdFusion server, while others implement alternative or open source CFML engines such as RailO or SmithProject.  A ColdFusion server is generally hosted on a windows machine, which typically runs Microsoft IIS web server.

The standard “optimal” and professional environment for a ColdFusion Web Server would be using the latest Adobe ColdFusion Server on the latest Windows Server OS edition with the latest security patches for the latest version of Microsoft IIS.

Take note that all of the “optimal” components for hosting a ColdFusion Web Server involve licensing fees. You must be aware that these fees are reflected in your hosting plans. Finding a decent ColdFusion Developer is hard to come by as well, for knowledge of simple #VARIABLES# and ColdFusion calls is not enough. The development of custom tags, layouts, and templates in ColdFusion are a large part of development in this language.  ColdFusion is almost analogues to PHP, or even a PHP framwork, a collection of functions which can be called to perform basic interactions between server and client.

ColdFusion Email Structure

<cfmail to = "to@domain.com"
      from = "from@domain.com"
      subject = "This is an email sent with cfmail">
      Here it is.
      #form.body#
  </cfmail>

PHP Email using CodeIgniter

function send_email()
 {
 $this->load->library('email');
 $this->email->from('from@domain.com');
 $this->email->to('to@domain.com');
 $this->email->subject('This is an email sent with CodeIgniter);
 $this->email->message('Here it is.');
 $this->email->send();
 }

On the other hand a web server running PHP is generally more flexible so to speak, as well as more portable. PHP can be hosted on both IIS and Apache servers alike and each has its ups and downs. PHP was designed to run for Apache in Apache’s native environment, linux, however there is a growing community of users of both Apache and PHP on windows boxes.

Over time I have seen many variations of server types implementing any or all of PHP, Adobe Coldfusion, ASP, Ruby, Apache, IIS, abyssws, WAMP, perhaps even and attempt at all server side scripting languages on one machine even, you name it. Some of these, as imagined, were a complete mess, and others surprisingly organized and clean functioning.

In terms of “optimal” environment. This can be greatly debated in the world of linux users and web development guru’s. A very simple click and go LAMP setup from the latest Ubuntu server package works great for a nice test server. Securing a lamp server for production is a complete different article, but when you find your optimal LAMP stack setup, you will know it.

If you are looking for cost – go with linux/apache/mysql/php

You can not beat free…can you?

If you are looking for security - go with linux/apache/mysql/php

LAMP stack is arguably more secure than a Windows/IIS server, this has been the case for years now. Both have security holes which do get patched, however the turnaround time on linux patches is higher.

If you are looking for support - its really a toss up now days. Some argue the Microsoft and Adobe has more support since they are paid/licensed software. However the community strength of LAMP server support has never come short to help with any problems that I have had to figure out.

If you are looking for somebody to blame when things to wrong – go with windows/coldfusion/iis.

This is because their support will help you fix the problem (eventually), otherwise it is their license being lost, sales decreasing, and one more user switched to free alternatives.

I hope you take these points into consideration when choosing between ColdFusion and PHP when you are selecting hosting for your web projects.

About Scott O'Connor

Co-Owner, CTO, Applications Development, Quality Lead
This entry was posted in ColdFusion, PHP and MySQL, Technical Decisions, Web Development and tagged , , , , , , , , , , , , . Bookmark the permalink.
  • Pingback: Flex learner | Blog | Are you undecided about ColdFusion vs PHP | Igoe Design

  • http://www.getrailo.org/ Todd Rafferty

    When linking to Railo, please link to the getrailo.org site which is the actual open source project. The getrailo.com site is the consulting business of Railo Technologies.

    As someone who has been in the CFML Community for years, I just want to mention that ColdFusion (regardless of which engine) runs _fine_ on Apache / Linux. I highly recommended you chose a redhat (REL) stack or CentOS. ColdFusion can run right along side your LAMP with no conflicts.

    If you’re looking for support in the open CFML space, both companies support their projects pretty well. For example, I’ve linked all the bug reports / feature requests for all three engines here: http://web-r.at/reportit

    So, the “free” discussion should be up for debate again because Railo / OpenBD is a viable alternative to not having to use PHP.

    • http://www.igoedesign.com Scott O’Connor

      Thank you, I fixed the link.
      You are correct, I have failed mention that CFML does work fine on Apache, as you say.
      However, this is a generalization posting.
      Also, I like your site link provided. Thank you.

      Feel free to discuss your optimal setups, and alternatives, in the comments!

  • Glen Lohnes

    This a truly great post and may be one that should be followed up to see what are the results

    A good friend e-mailed this link the other day and I will be eagerly anticipating your next page. Keep on on the top class work.

  • 106Miralles

    Thanks for writing this article. Now everything is clear for me.

  • bukmacher

    You post awsome articles, bookmarked for future referrence !

  • Jbriccetti

    As Todd mentioned, ColdFusion not only runs *fine* on unix, linux and behind apache, it is for many of us in the CF community the *preferred* platform, although in recent years windows and IIS 7 is much more secure and stable and also quite good.  Your suggestion that CF is generally hosted on a windows machine is misleading -  there is nothing about CF that ties it specifically to windows and IIS and there never was. In fact, this is a big difference between CF and ASP. You should edit the post, not just acknowledge it in the comments (which few will scroll down and read your acknowledgement that you failed to mention it in the post)

    your code example also may have been misleading. you can perform the “tag” OR you can send an email from the scripting format which is just like php’s – so CF actually supports (2) formats, one for more traditional coding and one that is tag based, which in the case of UI level functionality, blends quite well with html and xml. Like Java and jsp custom tags, ColdFusion also has very power custom tag capabilities, something that php doesn’t have because it’s soley script based (unless i’m wrong about php, which i could be).

    As for free/fee, I’ve found that the ability to rapidly develop *custom* applications in   CF is worth the server license fee many times over. Any hosting environment with *strong* security model (as in a non-shared server) has only a marginal monthly fee for a license Adobe version of CF. Railo and openDB are other options for free cfml parsing and they are quite good although they tend to lag slightly on features.

    Also, keep in mind that CF is Java – everything compiles down to java at run time, something php is not. As a result, you can develop or leverage java classes or jsp custom tags and run CF server in a j2EE servlet container on jBoss, websphere, so you dont have to use the built-in jrun context it currently comes in. With enterprise ColdFusion you can also configure multiple instances of the server and have ACLs accordingly, as well as isolated application pools. this is far more powerful than php… which i also use and (sort of) like.

    Why use php is the question and there are very good reasons… it’s the community, the crowdsourcing andit’s popularity however, that are the real reasons, not because it’s “more flexible or portable.”  – that’s simply not true. ColdFusion doesn’t have and likely never will have the same community and sheer volume of developers and will not likely be able to complete with php in that space – common paradigms like content management, blogging, ecommerce a-la wordpress, joomla, drupal – all these things ColdFusion developers don’t bother with or don’t do (or havent yet done) in the open source area, mostly because they are too busy making good money developing custom built apps in the business community.

    *technology* wise these servers are very similar and overall, i really think ColdFusion has a massive leg-up on php because of it is built on java and yet has all the power and flexibility of a rapid scripting language. at the code level, it rocks php.

    *practically* everyone should know php and know how to utilize it because the community is massive and there is a mass of plug-and-play components that have been developed and are quite useful. its a great free scripting language and because its pushed in the academic circles, lots of inexpensive labor from the colleges hit the job market already tooled up and ready to use php. so why not leverage all that talent.

  • http://igoedesign.com Scott O’Connor

    I’ve worked with CF mostly on and off with various projects for about 3 years. I’ve mostly reworked pre-existing code on production sites, as well as created new code on most of them. Mostly basic CRUD stuff. CodeIgniter/PHP in general I tend to have a stronger bond to, if you do not pickup from my tone in the article, also longer experience in terms of time and depth. This may be a source of bias, so I try to balance that out in review. Personal preference is for PHP, CI, anything open source. I will be revisiting my reasoning why in future articles.