Windows compatibility on OSX just got better


Parallels Desktop, the app that lets you run a virtual copy of Windows or Linux on your Mac, has just gotten better with the announcement of the forthcoming version 3 which adds two really snazzy features:

  • You can now set software on one of the OSes (Windows on the virtual machine, or the host OSX) to run software on the other side when it is launched, e.g. if you're running Outlook on the virtual Windows you can launch attachments in OSX apps without any stupid fiddling. Awe-Shum!
  • 3D support for games and other uses; how well this works is left to be seen, but it will hopefully mean being able to run Diablo 1 at the very least :)

Free backup app - Genie Games Backup


Despite its name, Genie Games Backup is a general purpose backup utility for Windows that lets you make backups of any files you want, and run the backup either manually or on an automatic schedule. While their fully-fledged commercial products work wonders, I'm personally amazed they're giving away something so fully fledged for free. Well worth trying out if you don't already have a backup utility.

Variables in ColdFusion Components (CFCs)


A couple of tips for anyone working with ColdFusion Components, aka CFCs:

  • You can control whether a function/method is accessible outside of the CFC or not by using the access argument on the cffunction line:
    • access="private" will make the function only available within the CFC so it can't be called from outside.
    • access="public" will make the function available to outside pages and other CFCs.
    • access="remote" will make the function available to outside pages, other CFCs and via remote applications through a web services interface (WSDL); you need to use this one if you want to make it available to Flash or Flex applications, etc.
    • access="package" will make the function available to other CFCs that extend it or are in the same code archive (called a "package").
  • You can control how variables are accessed within or from outside the CFC:
    • Any variables you set to the this scope are available outside of the CFC and as a result can conflict with other instances of your CFC! Watch out for this one!
    • If you want a variable local to only the function/method, use the var scope, e.g.
      <cfset var.widget = 'blue' />
      Note that you need to do this for loop counters too.
    • If you want to be able to access the variable from anywhere within the current instance of your CFC use either the variables scope or don't define a scope at all; for accuracy sake I recommend assigning everything to the variables scope if it doesn't fit one of the other criteria above.

Happy coding!

ColdFusion 8 public beta chews bubblegum, takes names


The world's first real server-side scripting language, which seemed to get quiet in its v5-v6 days, is back with a vengeance with the new ColdFusion version 8. Currently available as a public beta and due for public sale in a few months, the new release has a tonne of new features to get web developers in a tizzy. While version 7 IMHO felt like a minor upgrade for most of us (the most impressive new features were in the $6000 Enterprise edition), version 8 has lots of end-user features that really goes a great job of catching up & leapfrogging some of the competition. Here are some of the highlights:

  • AJAX interface with a huge amount of functionality: a data grid, an auto-suggest gadget, and tonnes more.
  • WYSIWYG editor replacement for textarea boxes, which uses FCKeditor.
  • Flash presentations generator to completely replace Powerpoint with something much better.
  • Built-in database. PHP 5 has SQLite, ColdFusion 8 has Derby.
  • RSS/Atom reader & generator, to make publishing or reading web feeds a non-issue.
  • PDF manipulation, everything from content modification to being able to secure documents.
  • Flex integration, for doing Flash-based applications without using Flash. Neat stuff.
  • Microsoft Exchange interface for accessing email, calendars, contacts, etc from Exchange - very useful for building intranets.
  • Image manipulation commands - after years and years of waiting, CF finally gets a command for manipulating images.
  • Really easy and powerful multi-threading - I'd like to see Ruby get multi-threading as easy as this.
  • Server improvements - not only can you more easily segregate your websites you can now also monitor how they are all performing.
  • A debugger! Has been missing since version 5.
  • Implicit struct and array creation, you don't have to manually create the variable and then assign data to it one item at a time, you can now just do <cfset months = ['January', 'February', 'March'] />.
  • Simple file commands, like finding a file's size without having to resort to Java, etc.

There's a whole bunch more, but those are some of the improvements that I'm really excited about. Go read the full What's New guide or watch the What's New videos, I think you'll be rather impressed, I know I am. I really can't wait for frameworks like Coldbox to upgrade to support some of the new features, now that would be niiiiice!

Web page attachments - download vs inline with ColdFusion


Here's a quick tip that'll help make life easier for anyone who's trying to use ColdFusion's CFCONTENT tag to send content to the browser. When you're sending a file to the web browser using CFCONTENT you can do it either as an inline file, i.e. the browser will probably try to display it, or you can send it as a file to be downloaded. The only problem is that to do the latter you can't do it with just the CFCONTENT tag, you first need to tell the browser that you're sending a file and then send it, for example:
To pop open the magic Save As dialog in the browser you need to send the Content-disposition HTTP header and tell it you're sending an attached file, along with the filename. Easy when you know how.


Subscribe to Front page feed