Wednesday, June 20, 2007

Amazon SQS CFC

I've just published the first version of a ColdFusion component for the Amazon Simple Queue Service (SQS). The SQS CFC uses mostly the query interface to SQS' API, except for the sendMessage method, which uses REST. This is because the query interface version of sendMessage only allows messages with a maximum size of only 8 KB, whereas the REST interface allows messages up to the full 256 KB limit.

A known issue exists with the addGrant method, which, as of 20 Jun 2007, is returning "Service Unavailable."

It's now available at Google Code. Just download the zip file and insert your Amazon Web Services Access Key ID and Secret Access Key into index.cfm, and start queuing.

Amazon SQS CFC - Google Code

Tuesday, June 12, 2007

I shall never use Eclipse again

Today, while working on a snazzy ColdFusion component I've been writing for the Amazon SQS API, my IDE, Eclipse, behaved erratically: first, when trying to save the latest changes to the CFC, Eclipse paused for several seconds, and then finally saved the file. Then I continued making changes, and tried to save again. Another pause, and then Eclipse said, "This file has changed outside in the filesystem. Want to reload it?" I elected to reload it, which I now know was not the right thing to do, because I got a file that was zero bytes in size! Eclipse had just destroyed my source file!

I'm sorry, but I can't have that--not while working on serious code. I am furious.

A ColdFusion IDE! A ColdFusion IDE! My kingdom for a ColdFusion IDE!

I shall never use Eclipse again.

Wednesday, March 14, 2007

An Epiphany: Application.cfc

While working on a project at work, I dumped the Application scope to see what was in it. Then, on a lark, I dumped the This scope to see what would happen. To my surprise, it dumped Application.cfc! Then it occurred to me—Application.cfc really represents the entire application. You never leave its scope; you can always access its methods and members. In essence, each page you access is "inside" Application.cfc. Or, in other words, every page in an application is encapsulated within Application.cfc.

I liked Application.cfc and its power and elegance before, but I love them even more now.

Wednesday, February 28, 2007

Sorry Ben, But I Hate Dreamweaver

I know that this statement by Ben Forta in support of Dreamweaver is a bit old, but you would think that Dreamweaver would only have improved since then. It hasn't.

Dreamweaver Sucks, Pure and Simple

Adobe Dreamweaver has some nice features, yes—chief among them being support for autocompletion of ColdFusion code, and pretty good syntax highlighting. Of course it has word wrap (cough—Eclipse), as one would expect it to, and it has a somewhat interesting RDS interface to your ColdFusion server, so that you can browse data sources and components, including SOAP web services.

It's not so much the feature set, you see, that has me not so eager to use Dreamweaver. It's the user experience. Call me a weirdo, but user experience is important to me. Dreamweaver is sluggish, sometimes unresponsive, and it is bloated. It's a WYSIWYG HTML editor that's trying to be an IDE, and, while it has nice IDE-like features, it just doesn't cut the mustard for serious CF application development.

But what are the alternatives? Here are the ones I know of:

  • CFEclipse: Not too shabby, but nevertheless out of the question because of the Eclipse Team's recalcitrant refusal to support word wrapping. Also suffers somewhat from bloat like Dreamweaver.
  • jEdit: No autocompletion. Written with Java and Swing, so it's not exactly the most resource-friendly app.
  • Vim: A killer text editor, but it has no autocompletion. (And it's not really an IDE.) Syntax highlighting for ColdFusion is not differentiated from HTML highlighting, which is obviously important.
  • CF Studio: Once the preferred ColdFusion IDE, now supplanted by Dreamweaver (and perhaps CFEclipse), its development ceased years ago.
  • PrimalScript: No word wrap, and it costs something like $140 for a license.
  • TextMate: Has autocompletion—sort of, but it exists solely on the Mac.
  • Intype or e: Not really available yet, and they're not really IDEs either, but when they become available, they will have on Windows much of the functionality of TextMate on the Mac.

So, even though I hate Dreamweaver, it's the best ColdFusion IDE available today. But that's not good enough.

The Solution

We need a new IDE, and that's all there is to it. ASP.NET developers get to use Visual Web Developer and Visual Studio, J2EE developers have Eclipse and NetBeans and IntelliJ IDEA. We need an IDE for ColdFusion like those, and we should accept nothing less.

Proposed Features

A ColdFusion IDE should have or do the following:

  • Word wrap (I hate to have to state this, but Eclipse doesn't have this. It's like demanding that a toilet have water in it, or that a CD player support stereo sound.)
  • Auto-completion like Visual Studio (IntelliSense), NetBeans and Eclipse
  • Support highlighting and auto-completion for CFML, (X)HTML, XML, Javascript (including JSON), CSS and SQL
  • Component and web service introspection
  • Datasource browsing
  • Templates (perhaps using the excellent Apache Velocity templating engine) and snippets
  • Parsing of included files, components, custom tags and web service interfaces so that auto-completion works with them as well
  • Be framework-friendly, but framework-agnostic
  • Have a responsive interface (unlike Dreamweaver)
  • A scripting interface for automation
  • Intelligent, automated deployment
  • Support for Subversion or the RCS of your choice
  • Wake me up in the morning to the gentle strains of a Schubert piano trio

(I'm kidding about that last one.) I could probably think of more features that I'd like if I had the time right now. I admit that the more features it has, the less likely it will not be bloated and sluggish like Dreamweaver. Perhaps two editions could be made, an Express version and a Professional version, or something.

I'd make an IDE if I had the time. Is anyone else interested in this?

Monday, February 5, 2007


Today I discovered Intype, which could well be the "missing text editor" for Windows, like TextMate is the "missing text editor" for the Mac.

I first encountered TextMate last year when I watched a demo of Ruby on Rails, and I was impressed. Since then I've seen other screenshots and demos of TextMate and they have all impressed me. More and more as I saw demos of TextMate, more and more I coveted it for the Windows platform. I even considered making a clone myself.

But then I heard about Intype, which, although it claims not to be a clone of TextMate for Windows, uses a TextMate-compatible bundle system and has TextMate-like commands and features. Like TextMate, it promises to be simple, elegant, yet powerful. An early alpha release is available at Alpha and beta releases are free, but the real product will be similarly priced to TextMate, around $25 to $45, covering all point releases within an integral release (e.g., all 1.x releases or all 2.x releases, etc.).

TextMate bundles, which contain syntax highlighting information as well as snippets, are said to be easily convertible to Intype's bundle system. TextMate has a ColdFusion bundle and, with that and Intype's cheap price in mind, it is quite possible that Intype could become my default ColdFusion editor of choice. What I've seen so far looks very good.

Link to Intype