Skip to main content
Known Participant
June 5, 2009
Question

Advice on decision, CF or PHP?

  • June 5, 2009
  • 1 reply
  • 519 views

This "expert" is trying to make a decision on a project and would appreciate any good advice.  🙂

Quite a few years ago I built a data-driven site for a client in ColdFusion and MS Access. Now, this client wants a second, near-duplicate of this site. (Yes, Murray, that client.  :-))

I have not been pursuing CF, or any dynamic data-driven stuff, in recent years.

So, I could reproduce it - and get my head into ColdFusion and Access again - (and purchase Access) - because I'll undoubtedly need to update the code, make at least some changes, etc.

Or, I could create the new site with PHP and MySQL. I am a beginner at both, but I would much prefer to spend time learning them at this point than getting into CF and Access again.

If I do it in PHP, I'll have to spend some of my own time getting up to speed and writing the code. The site is not especially complicated, but for a beginner, will take some work, I know. But it is probably time well-spent. On the other hand, using CF and Access will take considerably less time, since I can probably re-use much of the code - but I'll be soaking my head in CF and Access, which is not the direction I'm trying to go at this point.

Other factors: I'll have to purchase MS Access at $230, and my client's hosting costs will be higher for CF.

Suggestions, advice? Thanks in advance,

--
Patty Ayers | www.WebDevBiz.com
Free Articles on the Business of Web Development
Web Design Contract, Estimate Request Form, Estimate Worksheet
--

This topic has been closed for replies.

1 reply

David_Powers
Inspiring
June 6, 2009

First of all, if you haven't done any dynamic development for a long time, there's going to be a learning curve involved. A lot of people mistakenly believe that using Dreamweaver's server behaviors mean you don't need to learn the underlying technology. Nothing could be further from the truth. Significantly, Ben Forta's "ColdFusion 8 Web Application Kit" devotes about ten pages to using server behaviors. The remaining 1,600 pages are devoted to hand-coding. Ben Forta says:

[Server behavior code] is OK for some tasks (and is wonderful for rapid prototyping), but more often than not, it won't be enough.

I say pretty much the same in my Dreamweaver/PHP books. You need to understand the code that Dreamweaver is creating, in order to be able to customize it to fit your needs. So, whichever direction you choose, you need to learn at least the basics of the server-side language and SQL, the language used to communicate with a database.

Both ColdFusion and PHP are powerful languages, and both are relatively easy to learn. The main advantage of PHP is that it has a much larger user base than ColdFusion. So, it's a lot easier to find help when you're stuck. It's also widely available on hosting plans.

The difference between the two languages is that PHP feels much more like a programming language. Like JavaScript, PHP uses functions. A huge number of functions are built-in, but you can also create your own functions to perform repetitive tasks. This, I find, makes it very flexible. ColdFusion, on the other hand, is what's called a "convenience language". It hides most of the programming logic by using tags and attributes. This is both a strength and a weakness. It appeals to non-programmers, because it looks very similar to HTML. It can also do a lot with very little code. Performing a database query with CFML, for example, involves much less code than PHP. The weakness, at least from my point of view, is that you can't really see what's going on. I find remembering all the tags and attributes a major hassle, although that's probably a question of familiarity. I work with PHP all the time, but dabble only occasionally with CF.

As for databases, even if you go with ColdFusion, I would caution against using Access. Access is designed for small office database work; it is not suitable for deployment on a website. Both ColdFusion and PHP work with MySQL, which is much more robust. What puts off a lot of beginners is the fact that MySQL doesn't have a pretty user interface and that it doesn't create a single "database file" that you can upload to a website like Access. However, working with MySQL is actually quite easy. You can use a free front-end called phpMyAdmin with PHP, or a commercial front-end called Navicat. MySQL also provides some free front-end interfaces. Transferring the content of a MySQL database is actually quite easy. You export the data from one database as a text file, and use it to import the data to the database on your remote server. For local testing, you can get the MySQL Community Edition, which is free.

My personal recommendation would be to go with PHP/MySQL. No doubt, Lawrence will be along later to tell you why you should choose CF.

P_18Author
Known Participant
June 6, 2009

Hi David - Great information to help me with this decision. I do think it makes more sense to go with PHP/MySQL, but I need to count the cost of the learning curve and be prepared to spend a lot of my own time getting up to speed. I will need your most recent general book on the subject for sure.

If Lawrence does jump in, I understand, because I used to be one of the ones arguing for Allaire ColdFusion! And at that point, I do think it was the right choice. But there's always been, and still is, the issue of the cost of hosting, and it does seem like there's been a sea change in which PHP has become much more widely used than CF.

Thanks very much for the information and adviice - I really appreciate it.

--
Patty Ayers | www.WebDevBiz.com
Free Articles on the Business of Web Development
Web Design Contract, Estimate Request Form, Estimate Worksheet
--