Web Development

ColdFusion is *not* Java

Tags: 

Scott Stroz just posted a great article over on Doug Hughe's site regarding the tendency some people have of rejecting feature additions to ColdFusion because the feature can be done using CFML's Java underbelly. In my 3.5 years of developing with ColdFusion full-time I've seen countless times that experienced developers recommend that others "just use Java" to fill in missing functionality in ColdFusion, functionality typically available in competing technologies like Ruby, PHP or C#.

I started using CFMX6 and was immediately impressed by how easy basic things were. Want a query? Just use one simple command. Want to display your results? Just loop over the results or just start using the query variables on your page - it automatically shows the first record if you don't tell it otherwise. Easy, just like it should be. In addition there was extra depth behind it - CFML's object oriented system, frameworks, etc, allowed those who needed more to do so, while still staying in CFML.

As someone who came from a PHP background it was, however, rather apparent that even back then there were a few things missing - image handling, secure transfers and a database agnostic querying system were obvious ones to me. CFMX7 did not appear to me to further the cause - most of the additions seemed to be aimed at the "enterprisey" market, especially the event gateway feature, and most users weren't going to spend $6000 on that.

The folks that recommended using Java for day-to-day things were IMHO short-sighted and were doing ColdFusion a disservice - what should have been a push from the community to get the feature added to the core system, to have another feature given the "ColdFusion easy-to-use" work-over, the developer was being pushed towards a much, much more difficult technology. People who learn ColdFusion don't do so to use Java, they do it to use ColdFusion, just like you wouldn't learn PHP to use the C++ language it is written in.

Thankfully ColdFusion 8 (the "MX" was disposed of) has brought it back to where it should have been - neck and neck with similar tools, ahead in some cases, and back to making simple websites simple again. No more will we have to "just learn Java" to resize an image, or securely transfer files from other servers, and we gain easier AJAX routines, easier page layouts, and many more tangible and more usable features that will benefit a greater portion of the market, all wrapped up in an easy-to-use package.

So, well done Adobe, ColdFusion 8 is great, and I've got a request in at work to upgrade to the newest version.

RadiantCMS on Dreamhost

Tags: 

A small tip for anyone trying to install Radiant on their Dreamhost.com account.

The original instructions I found said that three ENV lines that had to be added to the dispatch.fcgi file had to be before the RailsFCGIHandler.process! line. Well it turns out they have to be before the require lines, e.g.:
[source:ruby]
ENV['RAILS_ENV'] = 'production'
ENV["GEM_HOME"]="/home/myaccount/.gems"
ENV["GEM_PATH"]="/home/myaccount.gems:/usr/lib/ruby/gems/1.8"
require File.dirname(__FILE__) + "/../config/environment"
require 'fcgi_handler'
RailsFCGIHandler.process!
[/source]

Simple online button maker

Tags: 

I came across this really simple button maker today:

You pick the button style, add text, set a few options then right-click & save. If you're interested they also have extra options you can get by paying $10 per month for a full account, but the basics are enough to get started with. One feature I liked was that you can type in text on multiple lines, handy for doing narrow buttons with multiple words.

Access queries as structs in ColdFusion

Tags: 

A small tip, but a very, very useful one nonetheless. Did you know that in ColdFusion you don't have to loop through a query to access specific elements of the query? I've been developing in CFML for several years and was unaware of this. It's great! Instead of having to go through the hassle of looping an array just to find one field, if you know the field and row number you can just do this:

<cfset variable = query[column_name][row_number] />

e.g.:

<cfset variables.product_name = variables.q_products[name][5] />

Thanks to Ben Nadel for that.

Sometimes you just feel like a complete neophyte. I wonder what other useful tricks lie beneath the surface?

Xenu's Link Sleuth - still the best link checker

Tags: 

A very important tool in a web developer's toolkit is a good link checker. There are tonnes of different ones on the market, some that promise to make your whites whiter and floss your cat, but in the end you just want a simple program that will check your site for broken links, maybe broken code too if you're so interested. A few of the features I'm always looking for include:

  • Option to include or exclude external links, e.g. if a page on mysite.com links to yoursite.com I may not care if that site itself is working.
  • The option to override what is considered an external link, which is useful if you put your media files on a separate hostname.
  • An option on how many checks it runs simultaneously. Some can handle hundreds of outgoing simultaneous requests (if your machine and net connection can cope) but I tend to turn this down and leave it running in the background.

After years of trying different ones I continually return to Xenu's Link Sleuth, a simple yet powerful app that does what is needed, without a load of unwanted fancy options. Xenu's doesn't confuse you with a list of unimportant non-broken URLs, and it doesn't take a ten-page wizard interface to set up each project, instead you can simply paste in the starting point and let it go to town, selecting extra options if you specifically need to. Why does it have to be more complicated than that?

Though it is a Windows app and I use a Mac, it works fine in Parallels for Mac, and probably would work in Crossover Office too; failing that, there's always holding on to a PC for these occasional tasks ;-)

A great utility that is well worth using.

Pages

Subscribe to Web Development