Main

ColdFusion Archives

September 21, 2009

Have you requested time for RIA Unleashed: Boston?

I've just gotten approval to go to RIA Unleashed: Boston on November 13th, and if you haven't made up your mind on whether or not to go, I'd suggest you make up your mind to attend. Brian's previous Flex Camp conferences showed off some amazing implementations and hosted some impressive speakers, and this year looks to have an even better agenda for web developers with a track devoted exclusively to ColdFusion developers. The list of speakers include Tim Buntel, Adam Lehman, Jason Delmore, and Ray Camden. I can't wait for this conference.

So make sure you come, too. And by the way, feel free to use my name as the person who referred you. ;)

September 9, 2009

Boston CFUG's September meeting: "ColdFusion Application Security: The Next Step"

For those CF developers in the Boston area, please join us at our next CFUG meeting entitled "ColdFusion Application Security: The Next Step", where Jason Dean, the ColdFusion blogosphere's resident security expert, will be presenting to us via Connect. Jason's blog can be found at http://www.12robots.com/.

Jason says: "We've all parameterized our SQL queries to prevent SQL injection attacks, right? So what's next? Are our applications safe now? No, they are not. SQL injection is only the tip of the vulnerability iceberg. There are many other security topics that need to be addressed in our applications. Threats and vulnerabilities are everywhere, and it is likely that your applications contain some of them. In this presentation we will discuss what threatens web applications and how to create countermeasures to address these vulnerabilities."

Please RSVP at: http://www.eventbrite.com/event/430485594
Date and time: September 16, 2009 from 6:00pm - 8:00pm
Address: Adobe Systems, 275 Grove St., Newton, MA 02466

July 13, 2009

Boston CFUG meeting this Thursday, July 16th

Reminder-- the next Boston CFUG meeting is this Thursday! We're hosting Sean Schroeder and Matt Levine, the creators of the free and open-source Mura content management system, from Blue River Interactive. Some of you may have heard of Mura under its former name, Sava CMS.

As I said in my email last week, I will be corralling as many people as I can to go out for beers after the meeting, so join us for a good time.

The meeting will be at 6:00pm this Thursday, July 16th, at the Sun Life Financial offices in Wellesley. Please RSVP if you plan on attending.

For more details about the event: http://groups.adobe.com/posts/ae47fb602a To RSVP: http://www.eventbrite.com/event/374175168

June 3, 2009

Boston CFUG's June meeting: Adam Lehman and Tim Buntel

We've scheduled a great meeting for June 23rd that you will not want to miss. Adam Lehman, ColdFusion's Product Manager, and Tim Buntel, Flex Product Manager, will be back to host this year's Adobe User Group Tour which will include discussion of the next versions of ColdFusion and Flex/Flash Builder. This meeting will include a number of giveaways and we will be providing good food and drinks.

Date and Time: June 23, 2009 from 6:00pm - 9:00pm

Address:
Adobe Systems
275 Grove St
Newton, MA 02466

RSVP: http://www.eventbrite.com/event/356084057

April 6, 2009

Open Mic Night with the Boston CFUG, Apr. 22nd

Back by popular demand, the Boston CFUG is hosting another Open Mic meeting where members can show off their latest projects, cool techniques, or code to everyone else. Audience members can offer comments, criticism, or offers of coding help. One lucky presenter will will the night's door prize. Members who are interested in presenting should contact co-manager Tom Mollerus by April 17th.

Scheduled for April 22nd at 6pm, this meeting will be hosted by ISITE Design Boston in Cambridge. ISITE is also generously providing food for the night.

Event details: http://groups.adobe.com/posts/ba4ef5b7ce
RSVP: http://www.eventbrite.com/event/321540737

March 24, 2009

John Rice on Real World jQuery at the BostonCFUG

The next Boston CFUG meeting will be on Wednesday, March 25, 2009 at 6:00pm at the Sun Life offices in Wellesley (Building 4) where John Rice of Vertex Pharmaceuticals will present Real-world jQuery. jQuery is quickly becoming a major force in the world of RIA development using Ajax, so don't miss this opportunity to learn more about it. As always, food and drink will be provided and your attendance enters you into our bi-yearly software drawing.

View the event details at: http://groups.adobe.com/posts/0e6dd411f4
RSVP at: http://www.eventbrite.com/event/307209873

February 12, 2009

Don't forget to download a Railo license

Either I wasn't paying enough attention to the Railo website, or they don't explain well enough how licensing for the Community Edition works. Probably both. But I got a suprise on my Railo-based website yesterday...

Continue reading "Don't forget to download a Railo license" »

February 9, 2009

Creating a customized URL to automatically log people in to a Connect session

Our marketing department has often wished that they could make two improvements to our Connect webinar process: first, that we could somehow get an automatic list of who attends the Connect session; and second, that our users didn't have to log in to the Connect session in the first place. Right now, you have to enter your name in the login form before you are allowed into the webinar.

So I did a little looking around in the Connect login form, and I found that the URL that the user is redirected to after using the form is in the format http://yoursubdomain.acrobat.com/[webinar name]?guestname=[user's name]. Now that we know what Connect is expecting, we can instead link to ColdFusion code which tracks the webinar attendance in a database, then redirect the user to the Connect webinar that we generate ourselves.

So, now that's the exact kind of link that we embed in our webinar invitation emails. For instance, if the Acme company had a webinar named '2009-Products' and it was sending an invitation to Jane Prospect, it would embed the URL http://www.acme.com/webinar.cfm?webinar=2009-Products&guestname=Jane%20Prospect, record her as an attendee in our database, then redirects the user to the webinar at http://acme.acrobat.com/2009-Products?guestname=Jane%20Prospect. Both goals accomplished.

February 5, 2009

Boston CFUG meeting: Adam Lehman, Adobe evangelist, talks ColdFusion 9 and Bolt

I'm announcing our next meeting on short notice, but for a very good reason: we've scheduled Adam Lehman as well as the lead engineers for ColdFusion and Bolt for next Wednesday, Feb. 11th, 6:00-8:00pm at Adobe's offices. This is a meeting you will definitely want to attend.

Adam, Adobe's ColdFusion evangelist, will present some of the upcoming changes in ColdFusion 9 (aka Centaur) and Bolt, the new ColdFusion IDE. Ram Kulkarni, who is the lead engineer on Bolt, and Hemant Khandelwal, who is Director of Engineering for ColdFusion, will also be there. They will open this up for a question-and-answer period as well, so this is a great opportunity for you to learn what changes are coming in ColdFusion's future.

Make sure to become a member on the CFUG's new site at: http://groups.adobe.com/groups/14433c4223/summary

And, make sure to register for this particular event with our EventBrite system at: http://www.eventbrite.com/event/275123903


If you're in the Boston area, I hope to see you there!

January 21, 2009

Great presentation by Nitai of SixSigns

I want to say thanks to Nitai of SixSigns for giving a great presentation to the Boston CFUG tonight on his company's digital asset management system, Razuna. Razuna is an amazing application that lets you store, browse, search, and even reformat images, videos, and other files.

razuna-preso.jpg

Brian Rinaldi and I are planning the next few month's worth of meetings soon, so if you have any ideas make sure to get them to us. I'm also considering another Open Mic night, so if you have a personal project you'd like to show off to the community, this would be your chance.

February 3, 2009

Data security: encrypting data in the database

For extra security, you may want to encrypt important information in your database so that someone who hacks in can't read it easily. For instance, you could be saving credit card information so that you can bill for services, or you could be saving the customer's sensitive business information. Here's the method I use to encrypt and decrypt important information.

Continue reading "Data security: encrypting data in the database" »

January 14, 2009

Boston CFUG meeting: Razuna open source digital asset management system

Our next meeting is only a week away, so I'm sorry that I'm not giving you more notice.  Chalk it up to  my scramble to get back to business after a busy holiday season and a first-week-in-January business trip. ;)

We're going to be the hosts to a virtual guest from SixSigns, Nitai Aventaggiato, who will be presenting his company's CFML-based digital asset management system, Razuna.  Razuna not only helps you store, search, and retrieve your assets, but it stores meta-data and helps transform and transcode your assets to other formats on demand (think photos and videos delivered in whatever format you need).

Meeting date: 1/21/09 6:00 PM, Sun Life Financial

You can find out more information about our meeting at the following URL:
http://bostoncfug.org/index.cfm?event=showMeeting&meetingID=D01A22D8-D61B-FA8C-8922DD6FC690A7EA

Please RSVP at the following URL:
http://bostoncfug.org/index.cfm?event=showRSVPForm&meetingID=D01A22D8-D61B-FA8C-8922DD6FC690A7EA

January 11, 2009

An easy filter for cross-site request forgeries (CSRF)

I just checked off one of the requirements for one of my projects at work: protect from cross-site request forgeries, or CSRF. It was much easier to accomplish than I expected-- here are the details.

Continue reading "An easy filter for cross-site request forgeries (CSRF)" »

November 26, 2008

Boston CFUG's December meeting: SOA with the onTap Framework

I can now announce the Boston CFUG's next meeting on December 9th: Service-Oriented Architecture with the onTap Framework, presented by Isaac Dealey.

The onTap framework moves developers away from stand-alone applications to a rich service-oriented environment in which applications are integrated with each other. Isaac says "This is the next evolution in software, taking us well beyond "single sign on". How many times have you written a security layer? A contact manager? A CMS? Stop reinventing the wheel. Let other people provide these applications as integrated services so you can focus on your core business."

For the door prize, we have something that I'd love to have myself (which only makes sense given that I'm the one who picks them out): a Kodak Easyshare 7" digital photo frame. And I'll throw in a free 2GB memory card to use with it. I hope that you can join us for Ike's presentation as well as some beers afterwards at the CFUG's second home, Dunn Gaherin's Irish pub.

Please RSVP at the following URL: http://www.bostoncfug.org/index.cfm?event=showRSVPForm&meetingID=DA41D921-D61B-FA8C-8D006B2CAAD11A72

October 23, 2008

Links to last night's Boston CFUG Open Mic presentations and Adobe software winner

I want to thank everyone who joined us last night at our Open Mic night with the Boston CFUG. We had a great turnout and a very good response on the open presentation format. People liked it so much that we're going to do another at some point in the future. Also, congratulations to the winner of last night's raffle for Adobe software-- Isaac Dealey. Isaac is presenting his onTap framework to the CFUG during our December meeting.

For those of you who want to get more information on the projects that were presented last night, here are the links from the speakers:

October 20, 2008

Win Adobe software at the Boston CFUG's Open Mic Night

Have a project that you'd like to show off? Have a bit of problem code that you'd like to get help with? Want to introduce yourself to the local CF community? Then come join us this Wednesday night at the Boston CFUG's Open Mic night, where you can not only present your code to the local community, but you'll have a chance to win any Adobe software item of your choice up to $2,100!

Contact me or Brian Rinaldi if you'd like to participate. Those who present will get an extra entry in the raffle for the software. If you RSVP as well, that means you'll have three entries for the night. Not bad odds, huh?

Again, the meeting is on Wednesday, October 22nd, at 6:00pm at Adobe's offices in Newton. Check the Boston CFUG's site for more details and to RSVP for the event.

September 17, 2008

Thanks to Joshua Cyr from the Boston CFUG

I want to thank Joshua Cyr of Savvy Software for his great presentation last night on strategies for building, deploying, and upgrading software-- as someone with a few projects myself, I benefited from his thoughts enormously. If you want to view his presentation slides, just go to Todd Sharp's SlideSix site.

A few thoughts stood out for me during the presentation...

Continue reading "Thanks to Joshua Cyr from the Boston CFUG" »

September 8, 2008

Join the Boston CFUG for Josh Cyr, Sept. 16th

Come join us at our next Boston CFUG meeting on September 16th, 6:00pm, at Bay Cove Human Services in downtown Boston. The topic? Josh Cyr of Savvy Software discusses software releases. Whether you work on commercial software, open source projects, or a software-as-a-service website, you'll find the discussion with your peers to be most valuable. Oh, and make sure to RSVP. We're having another drawing at this meeting; everyone who attends will be in the drawing, and everyone who RSVPs will get an extra ticket. Our prize will be a DXG 5.0MP Digital Camcorder.

So make sure to RSVP: http://www.bostoncfug.org/index.cfm?event=showMeeting&meetingID=CA07FF45-D61B-FA8C-8561F1F06EF4459D

Food and drink will be provided, and I for one will be continuing the festivities at a local bar after the meeting. ;)

August 20, 2008

Web Developer position at Ping Identity, Inc.

I'm glad to say that we're increasing our web development efforts here at Ping Identity's Waltham office, and so are looking for another web developer to join the company. Ping is a fantastic place to work-- we use the latest hardware and software, have VC funds from big names on both coasts, and experienced management. The office, at 1000 Winter Street in Waltham, overlooks the reservoir and is a really fun place to work. For instance, we have lunch brought in every once in a while; stock the fridge with snacks and beer; and a few VPs and I go running twice a week over lunch. We tend to work from home two days a week, which helps to make for a good work/life balance. Most importantly, we're a young firm that's well positioned for major growth in the federated identity and secure single sign-on space.

The person we're looking for can be anywhere from senior to junior level as long as you have some web development skills with ColdFusion. Familiarity with Eloqua (a lead management service) and Salesforce

(customer relationship management) will be bonuses, since we're going to have this developer interact with these systems. Anyone who's interested in finding out more should contact me directly. Here are the details:

Responsibilities

  • Working with the all Ping Identity business units, establish website design standards, information architecture and user interfaces which define the internet presence for Ping Identity.
  • Provide strategic and tactical planning for website investments and development priorities.
  • Maintain and execute against a dynamic queue of web site modifications and change requests.
  • Integrate surrounding applications and technologies including Eloqua, Salesforce.com, Atlas, and Google Adwords.
  • Provide alternative designs for requested changes and enforce design standards through these alternatives.
  • Monitor and provide regular reporting on our websites for performance, stability, quality control and improvement opportunities.
Qualifications
  • 3 to 7+ years industry experience website development and design
  • Minimum 3+ years strong and recent ColdFusion development
  • Minimum 3+ years DHTML/JavaScript/CSS development
  • Strong experience with object oriented design/development.
  • Strong experience with RDBMS systems (SQLServer)
  • Strong experience with Web Services
  • Strong working knowledge of browser-neutral, JavaScript, CSS, ColdFusion, Commonspot, XHTML, HTML, DHTML, XML, XSLT, RSS, Flash, Actionscript Excellent communication skills and general ability to communicate effectively with internal customers
  • Power user knowledge of Eloqua and Salesforce a strong plus.
  • Understanding of AJAX, Web 2.0 concepts, and Server-Side scripting
  • Thorough knowledge of web standards, such as W3C Standards and 508 Compliance.
  • Deep knowledge of website Information Architecture and User Interface design
  • Able to take ownership of a project from start to finish
  • Strong attention to detail and ability to manage multiple simultaneous work streams
  • Ability to assemble business requirements, conduct effective project meetings and project management.

Thanks to Gert and Michael of Railo

I want to thank Gert and Michael for the great presentation last week to the Boston CFUG on their open-source CFML engine, Railo. They were even kind enough to come out with us to Dun Gahaerin's pub with us afterwards.

They've done some very impressive work with Railo, which I'll cover in another post. Suffice it to say that they've not only provided a very robust and feature-complete engine, but they've made some improvements to their administrative interface that should prove advantageous to the CF development and hosting community. Finally, it's obvious they've put a lot of thought into improvements and extensions of the CFML language itself, which I believe should raise CFML's standing with non-CF developer communities.

So as I said, there will be more details of my thoughts on Railo to come in another post (I hope to test it out here at Ping Identity for the next version of our internal licensing service). Thanks again, Gert and Michael, for a great meeting!

July 31, 2008

Upcoming visit from Gert Franz of Railo

I'm getting excited for our next meeting for the Boston CFUG-- we have Gert Franz presenting in person on Railo, a CFML engine that runs on a wide variety of Java servlet engines, and provides a cost-effective, high performance alternative to using Adobe's ColdFusion engine.

With their announcement that they are partnering with JBoss to make their software completely free and open-source, Railo is the latest entrant to the open-source CFML engine category and is getting quite a bit of buzz.

Gert will present an overview of Railo, and what the advantages of using Railo are for CFML developers. He'll also be talking about the upcoming open-source conversion of Railo, and what that means for developers. Gert will have some free versions of the Railo software to hand out, and Brian and I will have some other goodies to give away as well. Make sure to RSVP for the meeting.

July 16, 2008

Boston CFUG meeting tonight at Adobe's offices

For those of you in the Boston area, you'll really enjoy the Boston ColdFusion User Group's meeting tonight at Adobe's offices in Newton. Luis Majano will be presenting his ColdBox framework-- it's a great, easy way to get introduced to OOP programming. Make sure to come!

http://www.bostoncfug.org/index.cfm?event=showMeeting&meetingID=CA04FA80-D61B-FA8C-8A343B03A53B5745

July 2, 2008

I'm now a co-manager of the Boston CFUG

I'm pleased to say that Brian Rinaldi recently offered for me to be his co-manager for the Boston Coldfusion User Group, and I happily (and immediately) accepted. I'll be helping Brian with some of the management activities that he's always wanted to do but hasn't had time for, and I hope that it gives me the chance to meet more people in the community and to spread the word about ColdFusion to new users who are interested in seeing what it's about.

For those of you in the Boston area, we'd love to see you at the meetings. We've got some great ones lined up in the near future!

June 30, 2008

Adobe MAX 2008 has an interactive background

I visited the Adobe MAX 2008 site after reading Ben Forta's blog post about the ColdFusion "unconference" behind held during MAX.

After noticing a little animation in the very-grayed-out background, I clicked to see if anything would happen. It turns out that there are three adjacent mini-worlds, each with its own short puzzle for you to solve, which lead to one easter egg apiece. They're pretty fun. Follow the link above to MAX if you want to see for yourself, or read more if you want to know the easter eggs that I found.

Continue reading "Adobe MAX 2008 has an interactive background" »

April 15, 2008

Unit testing (and beers) with the Boston CFUG

If you're in the Boston area and didn't make it to the ColdFusion User's Group meeting tonight on unit testing with MXUnit, you missed a good time. Marc Esher and Bill Shelton gave us an intro to unit testing, and a few of us went out afterwards to Dunn-Gaherin's to toss a few back with our visiting ColdFusion evangelist, Adam Lehman. Adam kindly said a few words about Adobe's current efforts with CF, and also raffled off a copy of ColdFusion Server.

Be sure to make it to the next meeting, when yours truly will be presenting on version-tracking your code with Subversion. I'll be raffling off a free copy of Subversion. ;)

P.S. So that no one misses the joke, then shows up expecting a chance at free software and gets angry at me: I'm kidding. Subversion is already a free download.

April 14, 2008

Spam/RBL lookup added to EmailParse.CFC

I made yet another update to EmailParse.CFC last week while I was working in the code for other reasons: I've added spam lookup on the sender's IP address courtesy of SpamHaus.org.

Continue reading "Spam/RBL lookup added to EmailParse.CFC" »

April 11, 2008

Updates to EmailParse.CFC: Quoted-printable parsing and Received header

I've posted an update and a fix to my EmailParse.CFC today:

  • The quoted-printable parsing for text and html body parts has been corrected. When you use EmailParse.CFC to forward an email, you can't tell CF that a mailpart is encoded with quoted-printable or Base-64. So, these mailparts need to be converted back to text in order to forward them correctly.

  • The parsing mechanism has been updated so that the values of the "Received" header, which often is often repeated several times in one email head, are aggregated in one property of the component. Previously, each instance of the Received header would overwrite the previous one, leaving only the last one for you to work with once the parsing was done.

You can read more about my email-parsing code for ColdFusion in the EmailParse.CFC Project area.

April 7, 2008

How to upgrade to CF 8.0.1 on Linux

In my previous post, I wrote about the trouble I had trying to install the CF 8.0.1 Updater for Linux. Thanks to a few good tips from Brian and Todd, I now know how to install the Updater without a problem-- but I think that I might as well post the solution since Adobe doesn't seem to realize that it may not be obvious to everyone.

Because the Updater has a .zip extension, I took it for a zip file. Without any other direction from Adobe, that seems like a reasonable course of action to me. But when you try to unzip the updater, you get errors. The solution is pretty simple: just download the updater file, change its extension from .sh to .bin, make it executable, and then call it directly:


# wget http://download.macromedia.com/pub/coldfusion/updates/801/coldfusion-801-lin_updater.zip
# mv coldfusion-801-lin_updater.zip coldfusion-801-lin_updater.bin
# chmod 755 coldfusion-801-lin_updater.bin
# ./coldfusion-801-lin_updater.bin

That will start the Updater quite nicely. Oh, and one other thing-- when the Updater finished and I went to view my site, I got a 500 error from the webserver. A simple stop-and-start of the coldfusion_8 service did the trick:


# service coldfusion_8 stop
Stopping ColdFusion 8, please wait
Stopping coldfusion server..stopped
ColdFusion 8 has been stopped
# service coldfusion_8 start
Starting ColdFusion 8...
The ColdFusion 8 server is starting up and will be available shortly.
======================================================================
ColdFusion 8 has been started.
ColdFusion 8 will write logs to /opt/coldfusion8/logs/cfserver.log
======================================================================
#

April 4, 2008

Problems with CF8 Updater for Linux?

I've written in to Adobe Support about it, but I want to know if anyone else has experienced the same problem that I have with the ColdFusion 8 Updater. Whenever I download the Linux version of the Updater and try to unzip it, I see the following issue:


[root@elmcedar src]# unzip coldfusion-801-lin_updater.zip
Archive:  coldfusion-801-lin_updater.zip
warning [coldfusion-801-lin_updater.zip]:  69730304 extra bytes at beginning or within zipfile
  (attempting to process anyway)
 extracting: Z_/installers/LiveCycleDataservice/flex-for-cf.zip  
 extracting: Z_/installers/JNBridge/JNBridge.jar  
   ...

When I download the same file to a Windows machine, I'm told that the archive is corrupt and I don't see any files. Has anyone else experienced a similar problem, or has anyone else successfully unzipped and installed the Updater for Linux?

March 19, 2008

Demo now available for Webmail

I want to share the news that there's now a demo available for Webmail, my ColdFusion web-based email client. Oh-- and as always, I'll make a free copy available to anyone who can make a translation file available in their language. I still need German, Portuguese, and many Oriental languages.

Fast, random sorting of queries, arrays, lists, and structs

I need to create a page that takes a structure of members and displays it in random order on the page (kind of an ever-changing "here are the latest members to sign up on our site" table). I needed to work with a struct because 1) it's what our CFC was built to return, and 2) the member data had a nested hierarchy that would have been impossible to output easily if it were in a query. While Googling on randomization, I came across Ben Nadel's post yesterday on randomly-ordered lists. He makes an interesting comparison between different methods of sorting: by sorting a struct (fast but doesn't allow duplicates), random append/prepend from one list to another (slow), multiple swapping of items in an array (fast, but perhaps not very random), and random selection from one list into another (extremely slow). So it occurred to me that with a bit more thought about the sorting algorithm, I should be able to build on Ben's work to create a randomization function that was speedy, handled duplicates, and could return a random list (or list of keys) when passed a structure, array, query, or list.

Continue reading "Fast, random sorting of queries, arrays, lists, and structs" »

March 14, 2008

CF8 tabbed-form layout gotcha in Firefox, Safari

I just found a "gotcha" with using forms that are spread across several tabs in a cflayout area. The form would render properly in all browsers, the tabs worked just fine, and my "Save" and "Apply" buttons submitted properly. Everything worked well, except whenever I submitted the form using Firefox my changes wouldn't be saved. In IE, however, the changes were kept. I checked out the problem in Safari 3, and the problem existed in that browser as well. (I'm referring to a Windows environment, by the way-- I don't know if this circumstance would occur on a Mac, although I tend to think it would.)

So the first thing I did to solve the problem was pretty revealing. I used cfdump to view the contents of the FORM scope after the form was submitted; in IE, obviously, all of the form data was being submitted, but in FireFox, none of it was being passed to the server. Why would this be?

Continue reading "CF8 tabbed-form layout gotcha in Firefox, Safari" »

March 10, 2008

Doh! Using this.mappings in Application.cfc

I've been working with ColdFusion ever since version 4.0, but of course every once in a light bulb goes on over my head and I realize how I've completely misunderstood something. Like this.mappings in Application.cfc.

I have to admit that I had stopped trying to use this.mappings because I could never get it to work. I would create a mapping in the fashion that the docs told me to:

<cfset this.mappings['myMapping'] = "/path/to/my/folder" />

And then I'd try to refer to my mapping name in my code, as I figured I should:

<cfinclude template="/myMapping/myFile.cfm" />

But it never worked. The server would just throw an error and tell me that the mapping didn't exist.

But tonight it dawned on me, and I wanted to share the epiphany so that you can either solve the mystery, too (if you also could never figure it out) or have a good chuckle at my expense (if you can't fathom why I ever got something so simple wrong in the first place). You don't refer to the mapping name in your file path... you refer to the this.mappings variable. Doh.

So the correct use is:

<cfinclude template="/#this.mappings['myMapping']#/myFile.cfm" />

Don't laugh too hard at me. I can only hope this revelation of my own foolishness will lift the wool from someone else's eyes.

March 7, 2008

A gotcha when calling Java/CFC with AJAX

I wanted to share this "gotcha" that I spent an hour on the other night: I was using <cfajaxproxy> to call a CFC that I had created as a proxy to another (the proxy CFC had methods which were accessible remotely, while the other CFC, stored in session, had public methods that woudn't have been accessible via AJAX. The final CFC accessed Java functionality. The proxy was really simple; it just took the exact same arguments as did the other CFC, and passed them on to the appropriate method call:

<cffunction name="setIndicator" access="remote" output="Yes" returntype="boolean">
        <cfargument name="cat" required="Yes" type="string">
        <cfargument name="indicator" required="Yes" type="boolean">
		
        <cfreturn SESSION.user.finalcfc.setIndicator(ARGUMENTS.cat, ARGUMENTS.indicator) />
</cffunction>

But every time I tried to call the proxy via AJAX, I received an error...

Continue reading "A gotcha when calling Java/CFC with AJAX" »

March 5, 2008

Want a copy of a ColdFusion-based webmail client?

WebmailI'd like to get some language files translated for my ColdFusion-based webmail client, which reads POP accounts. If anyone would like to provide a translation of a language file for me, I'll give them a free copy of the Webmail application, which normally goes for $29.00. The language file consists of about 250 words and phrases, which shouldn't take much time. Just drop me a line in the comments below or via my contact form.

The folks who help me out with this will also get priority to test my forthcoming ColdFusion-based IMAP client, which is currently in development.

Note that while I've gotten several responses already, you should feel free to offer me a translation even if you think that someone else has likely volunteered one for your language already. I'm perfectly happy to get multiple translations for the same language so that I can account for regional differences. So don't be afraid! Thanks.

February 22, 2008

Great ColdFusion 8 article; how about a comparison to PHP/RoR?

Boston's own Brian Rinaldi has just authored an article on SitePoint, ColdFusion 8: Believe The Hype. In it, he tells web developers about why they should consider using ColdFusion 8, with details on increased speed, stability, AJAX integration, server monitoring, debugging, and other items. All in all, the article is a great read. Kudos to Brian for working to publicize the great strides that Adobe has made in an already-fantastic development platform.

One topic that I'd like to see more of in ColdFusion articles, though, is why a developer should switch to ColdFusion from another environment, or what the specific advantages of CF are over other languages. Until this kind of thing is addressed, I don't think that people who have already invested their time in PHP or Ruby on Rails will bother to even consider CF, not to mention bother to read CF articles. Brian quotes a ColdFusion developer at The Economist who recently upgraded to ColdFusion 8, who says, "...the whole thing is ridiculously stable." That's absolutely true, but when we have a former PHP/RoR developer saying that instead of a CF developer saying it, then we'll have reason to really shout about it!

(Sheepish) Yes, I know, I should probably just volunteer to write an article myself... but I want to encourage others to do it as well.

February 15, 2008

XSLT style files updated for Microformats.cfc

For you microformats buffs out there who use my microformats CFC, I have an FYI: I've updated the XSLT stylesheets with the latest from hg.microformats.org. The updated files include:

  • hAtom2Atom.xsl
  • hreview2rdfxml.xsl
  • mf-templates.xsl
  • xhtml2vcal.xsl
  • xhtml2vcard.xsl
There were no updates available for datetime.xsl and uri.xsl.

February 14, 2008

Updates to Clickheat for ColdFusion

Colin suggested some smart changes for my Clickheat for ColdFusion project, which I've duly commited. Here goes:

  • In settings.cfm, I've taken my own email address out. [Doh!]
  • In click.cfm, I've replaced hard-coded email addresses in the CFCATCH with the email variables from settings.cfm.
  • In click.cfm, I've replaced GetDirectoryFromPath() with VARIABLES.logPath from settings.cfm.
  • In index.cfm, I've changed the form action to index.cfm instead of view.cfm.
  • In clickheat.js, I've changed URL paths which refer to the root so that they're relative to the root, so that the application will work correctly in any location off the root.

February 12, 2008

Solution for label collisions in ColdFusion pie charts

Hareni Venkatramanan of Adobe commented on my previous posting about an issue with how ColdFusion 7 and 8 display labels for small values in pie charts, saying that there was a solution posted for this issue in the 7.0.1 Updater. Indeed there is-- but the solution isn't applied automatically via the updater. Instead, you have to edit the XML files that define your chart styles. Read on to see what the new chart looks like and to find out how to edit the XML file.

Continue reading "Solution for label collisions in ColdFusion pie charts" »

February 8, 2008

Pie chart spacing problem for small values in CFCHART

Built-in charting capability is definitely one of the great conveniences of using ColdFusion over other languages (although I'd argue that Google's Chart API, which lets any developer call custom charts through a REST API, is eroding that advantage; more on that later). But sometimes there are a few flaws in cfchart that make you look at other charting solutions.

Continue reading "Pie chart spacing problem for small values in CFCHART" »

February 6, 2008

Creating modal dialog boxes with lightbox.js

lgw-tla.gifWhen you click on the "Member login" link on the Text Link Ads site or respond to a comment through the admin section of a Movable Type installation, you'll be presented with a new form in a slightly different manner than you're probably used to: instead of being sent to a new page, or seeing a popup window, the current page darkens, or "greys out", and a form appears immediately overlying it. It's a really neat way to keep the user in the current page context, and it neatly gets around the growing tendency for users to suppress popup windows.

They both do it with Lightbox Gone Wild, which is an adaptation of Lokesh Dhakar's Lightbox project. It's a very easy technique to pull off... link to three script files and one stylesheet in your main page; create a second page containing the code for your form; and then put a link to the second page in the main page with a class of "lbOn". Complete instructions can be found on the Lightbox Gone Wild page.

I know that cfwindow offers some of the same functionality, but it seems to me that cfwindow can't achieve the same level of flexibility as Lightbox.js can. For instance, I think cfwindow is somewhat more limited in how much of it you can style, and is also limited in whether forms in the dialog area can target the whole page.

January 30, 2008

Yet another lesson on database indexing... (and solving "null null" and that-query-doesn't-exist errors)

Boy, am I in a much better mood today than in the last two days.

I had come into the office over the weekend to re-install ColdFusion MX 7 on our production server, thinking that switching to single-server mode from multiple-server mode might solve some of the strange, unpredictable errors that we were seeing on our live site. The re-install, which we had practiced on our dev server first, went without a hitch and the site seemed to perform quite well. But as Saturday progressed to Sunday, the site saw even more errors than before. The same happened as the week began on Monday, with our site becoming increasingly slow and unstable.

The errors that we saw varied, and happened in all different parts of the site, but had one major theme in common: they all had to do with queries. For instance, we saw errors saying that "qQuiz" wasn't defined when we tried to loop over a query of that name-- but the cfquery tag for qQuiz, which executed before the loop, didn't throw an error. We also saw errors stating that queries were timing out, and even the infamous "null null" errors, which you see if you're using cferror templates to provide nicely-formatted errors for your users. Our pages, especially the queries themselves, were taking an amazingly long time to execute-- anywhere from 2 to 15 seconds per query. Try as a might, I couldn't get a handle on what the problem was...

Continue reading "Yet another lesson on database indexing... (and solving "null null" and that-query-doesn't-exist errors)" »

January 29, 2008

Introducing ClickHeat for ColdFusion, a clicks heatmapping application

I'm finally ready to share ClickHeat for ColdFusion with the rest of the community. It's a port of Labsmedia's original ClickHeat project, which is written in PHP. ClickHeat shows you where users are clicking on your pages: which links, which graphics, which nav items.

ClickHeat has two main parts: a JavaScript which tracks click coordinates and sends them via AJAX to a .cfm page which saves the information to a log file; and an application which reads the log file and converts it to a click map or heat map. A heat map creates a fuzzy, color-coded map telling you where the greatest amount of click activity occurs on your page (cooler blues indicate less activity, while brighter yellows and reds indicate more activity).

You can check out ClickHeat in my projects section. Please let me know what you think or if you run into any problems using the code.

January 17, 2008

Internationalization: Integrating language files into your ColdFusion application

While thinking about which features to include in one of my applications, I decided it would be valuable to customers (and a good mental exercise for me) to provide the cabability for the app to support different languages, and to support the ability for the user to add new languages of their own.

I will admit that while I did look around a bit for articles on how to achieve this, I didn't look very hard, because the solution seemed readily apparent...

Continue reading "Internationalization: Integrating language files into your ColdFusion application" »

January 15, 2008

ColdFusion market share: Why isn't CF offered on Yahoo! Domains?

Jake Munson's recent blog entry about ColdFusion's market share made me do some thinking. We all benefit when CF gains market share, since there will be 1) more work for CF developers, and 2) a more robust community, with more open source projects and more code to be shared among us. So how can CF be put in front of developers who aren't otherwise exposed to it? Is there any way its use could be effectively free, like PHP is?

So it occurred to me that there would be a way to get it in front of a large number of developers. There are a few hosting companies who really reach a large audience, such as Yahoo! Domains. Whatever such companies offer as hosting tools is what the population at large will try. Now I ask you-- if someone were to sign up with Yahoo! for their web site, and be given the choice of using PHP or ColdFusion to code their site, which would they choose? ColdFusion, of course!

So why on earth hasn't Adobe struck some kind of deal to get CF offered on Yahoo! Domains? Instead of making someone choose CF as their hosting plan, why not get it to be offered for free to whoever signs up? Adobe would still make money from a licensing fee, and ColdFusion would get huge exposure.

January 8, 2008

Configuring Foundeo Spell Checker to work with ColdFusion's FCKEditor

During a recent project, a client wanted to get a spellchecker working with FCKEditor. They had selected Foundeo Spell Checker to work with, which is a nicely-portable implementation since it uses a .jar library as the spelling dictionary-- no need to install a specific library that could only run on Windows or OSX or Linux.

The following instructions are good for the downloaded version of FCKEditor, not for the version that's built in to Coldfusion 8. Because the JavaScript object reference for the editor is different for CF8, I'll have to give instructions for that editor in another post.

Continue reading "Configuring Foundeo Spell Checker to work with ColdFusion's FCKEditor" »

January 7, 2008

How to get dynamic content on static HTML pages

When I first started my blog, I was using an old version of Coldfusion that couldn't support any of the modern blog projects. So, I installed MovableType instead, which publishes my blog as static HTML pages. Static code makes it kinda hard to put in all of those nice, dynamic touches that web developers are used to including in their pages, especially of the subject of the blog is often ColdFusion.

But I got it in my head that I wanted to put interesting and ever-changing quotes at the bottom of my blog entries, as I've seen on a few other major sites (you may have noticed the pithy quote at the bottom of this page). More experienced developers will be able to guess right away how I got it to work, but if you're curious about how I did it exactly, please read on.

Continue reading "How to get dynamic content on static HTML pages" »

December 20, 2007

Beta testers needed for Webmail

I'm nearly finished with a new version of Webmail, my web-based POP email client which is written in Coldfusion. But to make sure that it works well in many different environments and with many different POP servers, I'm looking for people to serve as beta testers. Those who are selected as testers and who provide feedback will get a free copy of the code.

webmail-screenshot-login-sm.pngAs a quick introduction, Webmail provides web-based access to any POP account. It's not intended to be your main email client-- instead, it's intended to be used to read and respond to your emails when you're away from your main client (such as when you're away at a conference, at a client's office, or in a friend's house). Webmail will not delete any of your emails from your POP account unless you specify that certain emails should be deleted.

webmail-screenshot-messagelist-sm.pngWebmail now offers the ability to save user preferences including a timezone setting so that all dates are displayed properly, spam keyword recognition, an address book, and even a search function. This new version of Webmail requires ColdFusion 8.

I'm also looking for people who can provide language translations for Webmail (it's about 240 words or phrases, which might take you an hour or two). So if you can test and/or provide a translation, please post a comment below and put your email address in the comment form (I'll be the only one who has access to your email address).

Note: as per Nick's comment, please let me know your web server and email server specifications in your comment. If you have something unique, I'm more likely to include you as a tester.

October 22, 2007

Validating multiple emails in one field-- server-side

My previous post addressed how to use a client-side script to validate a To:, Cc:, or Bcc: field that may have more than one email address. Since not all people have JavaScript enabled, it's always a good idea to validate on the server as well-- and with multiple emails, you can't just use the function IsValid('email', [field value]) to validate. So, I converted my JavaScript function to ColdFusion code.

Continue reading "Validating multiple emails in one field-- server-side" »

October 4, 2007

Simple browser and OS sniffing in ColdFusion

It still happens these days that every so often you have to write different code for different browsers-- you might output different form controls for Firefox versus IE, or might write in different stylesheets for older browsers, or you might write out different JavaScripts for IE5 on the Mac. So what's the easiest way to tell which browser and OS is calling your page?

Obviously, you can look through the server's CGI variables too see this information. But you don't want to parse through it every time you have an if-else condition, so I suggest identifying this information once per request or even just once per session with the following code:

<!--- Get the user's platform and browser --->
<cfif CGI.HTTP_USER_AGENT contains "MSIE">
	<cfset REQUEST.userAgent = "IE">
<cfelseif CGI.HTTP_USER_AGENT contains "Opera">
	<cfset REQUEST.userAgent = "OP">
<cfelseif CGI.HTTP_USER_AGENT contains "Safari">
	<cfset REQUEST.userAgent = "SF">
<cfelseif CGI.HTTP_USER_AGENT contains "Netscape">
	<cfset REQUEST.userAgent = "NS">
<cfelseif CGI.HTTP_USER_AGENT contains "Gecko">
	<cfset REQUEST.userAgent = "MZ">
<cfelse>
	<cfset REQUEST.userAgent = "NS">
</cfif>

<cfif CGI.HTTP_USER_AGENT contains "Mac">
	<cfset REQUEST.platform = "Mac">
<cfelseif CGI.HTTP_USER_AGENT contains "Linux">
	<cfset REQUEST.platform = "Linux">
<cfelse>
	<cfset REQUEST.platform = "PC">
</cfif>

Afterwards, you can just refer to REQUEST.userAgent and REQUEST.platform to get the user's environment.

October 2, 2007

Updates and fixes for Microformats CFC

I've posted an update to my microformats CFC today. There are two bugfixes and several XSLT updates (thanks to Gideon Marken for bringing my attention to most of these issues.):

Bug fixes:

  1. microformat classes would not be found in a string if they were combined with other class declarations (i.e., the CFC would find <div class="hcard"> but not <div class="pagetitle hcard">). The regular expression to match classes was updated to fix this issue.
  2. the CFC would fail to recognize microformat strings as valid XML if they contained an unescaped ampersand ('&', often found in URLs, should be '&'). The CFC now automatically escapes all ampersands when parsing microformats out of a string.


Updates:
  1. xhtml2vcard.xsl was updated to the latest version as found on http://hg.microformats.org/x2v.
  2. xhtml2vcal.xsl was updated to the latest version as found on http://hg.microformats.org/x2v.
  3. mf-templates.xsl was updated to the latest version as found on http://hg.microformats.org/x2v.
  4. hAtom2Atom.xsl was updated to the latest version as found on http://hg.microformats.org/x2v.

You can download the CFC from my microformats CFC project page.

September 26, 2007

Preventing scheduled tasks from running on weekends

The other day I found myself scheduling a task which would send out financial reports to users on a daily basis. The task really didn't need to run on the weekends, but there's no way to indicate that in the CF Administrator-- the scheduling form it gives you either lets you run at a specific date and time; daily/weekly/monthly at a specific time; or daily at a specified interval. There's nothing that will let you run a task only on certain days of the week.

Luckily, that's easy enough to control within your scheduled task itself. All you have to do is check to see what day of the week it is and abort page processing if this day is one on which you don't want to run the task. If you check the calling user agent, you can even give yourself the flexibility to call the task to test it on the days you don't want it to normally run. Sample code is below:

<!--- If this page is being called as a scheduled task and the current day is Saturday or Sunday --->
<cfif CGI.HTTP_USER_AGENT eq 'CFSCHEDULE' and ListFind('1,7', DayOfWeek(Now()))>
	<!--- Abort the page with a message --->
	This page doesn't run on weekends.<cfabort>
</cfif>

September 27, 2007

Testing, protecting, and logging your scheduled tasks

How many times have you tried to test a scheduled task that generates emails to your site's customers-- say, a nightly message to those customers whose subscriptions will expire soon-- and accidently sent the email off to customers? I've done it too many times to count, so I've had to develop a few practices to help me test my tasks without actually performing any actions I don't want to happen. At the same time, these practices have helped me learn how to protect my tasks from malicious users and log a task's results for later review.

Continue reading "Testing, protecting, and logging your scheduled tasks" »

September 14, 2007

Finally, a (frustratingly easy) fix for "null null" errors

After months of poring over CFCs for non-var'ed variables or other problems, I've finally solved the mysterious errors we've been getting on our production site at work with the help of Ray Camden's post "NPEs, onRequest, and other mysteries of the universe". If you have ever gotten intermittent ColdFusion errors with the message "null null" or "invalid query parameter binding" in lines of code that you know are correct, then you've run into this maddening problem.

Ray's blog refers to the experiences of one of his readers, who after seeing unpredictable null pointer errors in his site is advised by his web host's support tech to add a very basic onRequest function to his Application.cfm file. This problem sounded nearly identical to the one I've been tearing my hair out over for months (well, I stopped tearing my hair out over it and just started abiding with it months ago). I already had an onRequest function in my Application.cfc file, but I decided to mimic the one mentioned in Ray's post as closely as I could, so I added the <cfreturn /> call to my code. And do you know what? The errors stopped!

So if you've ever seen "null null" errors in your code, take a look at your onRequest. I don't know why this solution works, but I'm glad it does. Does anybody know why the NPE's happen, or why the inclusion of <cfreturn /> seems to solve them?

September 12, 2007

Accepting Complex Data Types from PHP/ASP in a ColdFusion 7 Web Service

At work I've been preparing a new web service for our licensees to use. It's not just a content feed, like most examples of web services that you hear about; instead, it's a financial tool, where the licensee offers the tool's interface on their site, calls our site with the user's data, and then displays the calculated results that we send back. I decided that in order to make the licensee's own development work go smoothly, we should test out the new service ourselves from another server in another programming language-- we should eat our own dog food, in other words. The challenges that we found was in generating and serializing complex datatypes in PHP, and in deserializing those datatypes back to structs in our web service. Here's how we resolved it.

Continue reading "Accepting Complex Data Types from PHP/ASP in a ColdFusion 7 Web Service" »

August 24, 2007

Parsing emails in ColdFusion if you can't use CFPOP

For too long now, my previous posts on the topic of passing emails to ColdFusion have promised that a future post will deal with how to parse emails in ColdFusion. So I can now happily (and somewhat sheepishly) announce that code for parsing is finally here.

I have a new project up called emailParse.cfc. You pass it the source text of an email, and it returns a struct with all headers, body parts, and attachments parsed out. There are even functions to forward the email on to another address, to try to get the email's context (ie, whether it's a hard bounce, soft bounce, out-of-office reply, or otherwise), and whether the email might be part of a loop. The whole idea is to let you programmatically deal with the emails that come into your server in real time, instead of relying on intermittent CFPOP calls from a scheduled task.

So feel free to try out the email parsing code, and let me know what you think.

July 17, 2007

Passing emails to ColdFusion through PHP

I've written about how you can send data to ColdFusion from another task on your server, such as passing an email from your mail system to CF through a shell script. But what if the shell script doesn't work, or what if you're on Windows and don't have access to scripting at all? Well, you can also use PHP to pass the data. Here's how.

Continue reading "Passing emails to ColdFusion through PHP" »

July 16, 2007

A CFCALENDAR replacement to let you select months or weeks

The Flash calendar that the CFCALENDAR tag generates is pretty handy. It looks sharp and can be sized to whatever dimensions you need, but in my opinion it has one major feature omitted: it can't be configured to let the user select a whole week or month at a time. I know plenty of applications where you'd want to be able to select a date range with just one click of the mouse, as you can do in the calendar for Google Analytics.

So to that end, I'm contributing the following calendar CFC to the developer community. It looks and acts like the Flash-based CFCALENDAR, but it will let you select a week or month as well as a single day.

Continue reading "A CFCALENDAR replacement to let you select months or weeks" »

June 13, 2007

Icon-based and tree-format dialog boxes with CFTREE and CFLAYOUT

As a follow-up from my earlier posting on tabbed dialog boxes using ColdFusion 8's new cflayout and cflayoutarea tags, I'll explain how you can also use those same tags to create dialog boxes with expandable/collapsible trees or icon lists in the left-hand pane and forms in the right-hand pane. These kinds of interfaces will be readily recognizable by users since they're almost exactly the same as you'd find in a desktop application.

Continue reading "Icon-based and tree-format dialog boxes with CFTREE and CFLAYOUT" »

Tabbed dialog boxes with CFLAYOUT

With ColdFusion 8's new cflayout and cflayoutarea tags, you can now create tabbed dialog boxes like you'd find in any desktop application, complete with Save, Cancel, and Apply buttons. Users will instantly be familar with the interface.

Continue reading "Tabbed dialog boxes with CFLAYOUT" »

June 11, 2007

CF through a command-line interface part 2: programmatic calls

In a previous post, I noted Ashwin Matthew's technique of calling CF from a command-line interface with the use of cURL. This idea got me thinking. Using cURL to pass URL parameters to a script is well and good if you are manually typing the calls, but... what if you want to automate the process and and pass dynamic data whenever a certain event happens on your server?

For instance, I often write PHP scripts to automatically handle responses to certain emails that have been sent in to our company. Emails containing unsubscribe requests are processed so that the corresponding email is removed from our newsletter list; support requests get an autoresponse and are passed on to certain personnel; and I've even written a script for a web-based project management site that redistributed any email it received to a dynamic list of project members. All of these tasks happened automatically, as soon as our mail server received an email. Now I've figured out how to do the same thing with ColdFusion-- and this will work without event gateways and even if your mail server is separate from your web server.

Continue reading "CF through a command-line interface part 2: programmatic calls" »

June 1, 2007

Using CFTHREAD to create real-time "Loading..." animation pages

After reading Ben Nadel's piece on using ColdFusion 8's new cfthread tag, I started to wonder if threads could be used to create real-time loading pages (real time meaning that you see an animated loading page for as long as the background processing is going on, not for some arbitrary amount of time set by a web developer). For instance, travel sites such as Travelocity give you a real time loading page which reads "Searching for the best fares..." for as long as it takes to search on fares for your itinerary. And now thanks to the new cfthread tag, I believe I've found a way to do it the way that they do.

Continue reading "Using CFTHREAD to create real-time "Loading..." animation pages" »

May 31, 2007

Calling CF from a command line?

While looking over Ashwin Matthew's ColdFusion blog posts, I caught this gem on calling CF from a command line interface (CLI). I have always wanted to use this exact feature but always presumed that it wasn't possible. But now that I know better, I can stop using PHP for CLI work and start using a far better language for the task.

Updating cached queries after content changes

One of the finer arts of being a ColdFusion developer is learning how to efficiently cache your queries. CF gives you such an easy and powerful way to cache your queries that it's easy just to start caching particular queries for a specific amount of time and leave it at that. But what if you cache your query for an hour or a day and an editor updates the content in the meantime? The content as it's displayed on the website won't change until the cache expires, which may not please the editor. So you might decrease the duration of your cache's lifetime, perhaps to just an hour. But then you could be refreshing the cache a lot more often than you need to since the editor doesn't make changes more than once a day. So is there a way to get fine-tune control over your query so that it's cached for as long as you need but gets refreshed right after someone updates the content?

Yes there is! Read on and I'll share my technique.

Continue reading "Updating cached queries after content changes" »

May 30, 2007

Microformats CFC mentioned in Open Source Update and ColdFusion Weekly Podcast

Brian Rinaldi was kind enough to mention my microformats code in his latest ColdFusion Open-Source Update as well as in his contribution to the ColdFusion Weekly Podcast. Thanks, Brian! I'm gratified that you think the code is worthy of the community's attention.

Digg this-- public beta of ColdFusion 8

Ray Camden and Brian Rinaldi have each mentioned in their blogs that the public release candidate of ColdFusion 8 (also known as "Scorpio") has been posted to Adobe Labs. Release the hounds!

And to help spread the word, make sure to digg the story!

May 17, 2007

Thank you, Adobe

The Boston CFUG was treated to a preview of CF8 (aka Scorpio) tonight by Jason Delmore. The set of new features in Scorpio is really amazing: it has new database introspection tags, MS Exchange integration, and automatic creation of Breeze/Connect presentations; the especially exciting and obvious improvements are native image manipulation, improved file I/O, and caching for queries which use the <cfqueryparam> tag (finally!).

Kudos to Brian Rinaldi and Jason Delmore for putting together such a fun presentation. I really look forward to working with CF8.

Oh, and I also really ought to thank Brian and Adobe for the generous prizes they raffled off. I was the lucky recipient of two of them. Thanks again!

May 16, 2007

ColdFusion CFC for microformats

Since hearing about microformats at the An Event Apart Boston conference, I've wanted to build some tools for myself and to share with other ColdFusion developers to help make use of this new standard. The tools I've created will handle creating and formatting of hCards, hCalendars, and hReviews, and they'll also handle parsing these formats from other people's web sites just like the Technorati contact tool does.

Very quickly: microformats are an XHTML specification which supports the encoding of contact data (hCards), dates and events (hCalendars), reviews (hReviews), and other formats in regular XHTML code, thus enabling machines to successfully parse data out of the same URIs that people can read themselves. This saves developer time and makes the content more semantic and search-engine friendly. Read John Allsop's blog Microformatique for a more in-depth yet approachable explanation.

You can download the CFCs here. Please use them, modify them, and give me feedback! I hope that lots of people find them helpful.

Just added: I've created a listing for this project on RIAForge at microformats.riaforge.org

May 14, 2007

Faster file parsing in Scorpio

Finally! File parsing will get faster in Coldfusion, as Ben Forta informs us via his blog.
For starters, if you have ever had to work with large text files in ColdFusion (maybe parsing a large CSV file) you'll know that doing so is very inefficient. ...This is slow for two reasons. Not only does ColdFusion read the entire file into memory in a variable all at once, but also looping through the file requires treating it as a list which involves lots of parsing which can also be resource intensive. ...[The new code will] open the file, reads one line at a time, and closes it when done.
Sweet! This will make many of my pages sooo much faster.

May 1, 2007

Problems with browser-cached charts in ColdFusion

After adding some charts to the result pages of our tools with CF7's new <cfchart> tag, my boss reported an annoying behavior that he observed: if he clicked the browser's back button to go back to a previous result page, the chart wouldn't appear. Instead, he'd get an placeholder graphic with an error message about the chart having expired from ColdFusion's cache. What to do?

Continue reading "Problems with browser-cached charts in ColdFusion" »

April 30, 2007

Creating a "Loading..." Animation Page with ColdFusion

There's a reports section on the web site at work that crunches through a lot of data and makes a number of CFHTTP calls to grab real-time stock quotes from another server. All this made for enough latency for my boss to notice it and ask if there was anything we could do to improve it. When I told him that we couldn't get around the time it took to process so much data and get stock quotes, he asked if we could at least show the user a page with an animated graphic to make it appear that the page was being generated and delivered to them. So, I did a bit of research and came up with a loading page. It was, admittedly, a little harder than I thought it would be...

Continue reading "Creating a "Loading..." Animation Page with ColdFusion" »

April 20, 2007

Why Don't Scheduled Tasks Always Run As Scheduled?

I have a certain scheduled task configured to run once a day on my production server. It queries the database for a certain subset of users, then sends those users an email. It also writes the results to a log file that I then send to myself later that morning. It's very similar to several other scheduled tasks on the same server. So... why doesn't the task run at all? Nothing shows up in the log at all, despite the fact that I can run the task from my browser without error; there's nothing in the application log showing that an error occurred; and the Scheduler log shows that the task was executed and rescheduled.

The one anomaly that I do notice is that the scheduler log shows this particular task being rescheduled and then being executed, which happens with no other task. Does anyone have any tips or prior experience they can share?

April 12, 2007

Contextual Form Field Labels with ColdFusion

I think that form field labels should be used to give users feedback about the status of the field: whether it's required, or whether they've filled it out correctly. If a user didn't fill out a field correctly and you need to send them back to the form again, you can use a ColdFusion custom tag to highlight form labels to instantly show users which fields need their attention. Personally, I really like it when web sites go the extra mile to do this for me, and conversely I get annoyed when a site makes me search around in their form because they haven't clearly indicated which field or fields needs correction.

Continue reading "Contextual Form Field Labels with ColdFusion" »