Adobe Solution Partner

October 12, 2006

MissingFuse handler for Fusebox5 development

Filed under: Fusebox, General Development — Tags: — Nat Papovich @ 11:17 am

I’ve been building a new FB5 application for the last couple months and have found myself adding fuses on a daily basis. My natural development process is to make the circuit.xml then go back and add the fuses. But sometimes I get out of order and try to hit a fuseaction in my browser before I’ve even made the empty fuse, resulting in a missing .cfm error.

To assist in this aspect of development, I’ve created a simple fusebox.missingFuse.cfm errortemplate.

This errortemplate creates all missing fuses <include>d in circuit.xml for the currently-executing Fuseaction request. The first missing include is caught, handled by the errortemplate, then the page is refreshed automatically. In the case of a second missing <include>, it will again get caught and written. Ad nauseum. Helpful for, say, the act_file, the other act_file, then the dsp_file.

Download the file by clicking the teeny little “Download” link at the bottom of this post, and drop the .cfm into your errortemplates folder. Whenever the Fusebox cores hit a missing fuse in circuit.xml, it will be automatically created for you.

Modify line 1 if you’re using development-circuit-load. If you wanted to enable this errortemplate in production mode, you could, for example, modify line 1 to work in production mode as well as, for example, send you an email message when it encountered a missing fuse rather than write out an empty fuse like it does now.

Enjoy!

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • StumbleUpon
  • Technorati
  • TwitThis

2 Comments »

  1. Nat,

    Congratulations on the new job. I like the idea of the missing template handler creating fuses. Just a pity it can’t add the code too!

    Comment by Kevin Roche — October 13, 2006 @ 12:00 am

  2. Hi Kevin – Are you coming to MAX? I’ll be there. I spent weeks and weeks trying to make the error template write the correct code. I tried inferring the purpose from the fuse name, looking into application-scoped factories for matching names, introspecting method names, peering at the attributes scope, correlating the fuse position in the circuit hierarchy. But then I gave up.

    No I didn’t. Just kidding. But wouldn’t that be cool?!

    Comment by Nat Papovich — October 13, 2006 @ 12:00 am

RSS feed for comments on this post. TrackBack URL

Leave a comment

 

Server Down?

Maximize Web application uptime by drawing upon Webapper's years of experience tuning and stabilizing many of the world's largest ColdFusion Web applications. Contact us today!