Aarrgghh!!

One guy's take on the web, programming, cigars, politics, Philadelphia, and whatever else comes to mind.

September 2007 Archives

Max-bound

September 30, 2007

I'm on my way to Max. I'll be staying at the Palmer House Hilton.

If you run into me be sure to try and scam a cigar out of me.


September 30, 2007 Posted by Terrence Ryan at 11:22 AM

Cigars, ColdFusion, Web Development, adobemax07,

ColdFusion 8 Mapping Application Name

September 26, 2007

I think I just discovered my favorite block of code ever. As such, this is a post so that I remember how to do this when I need to do it again, your may not be so impressed.

I was trying to figure out a terse, reusable way of making sure that my application root was mapped to my application name, and that my customtags folder be mapped as a custom tag folder. It had to work with inherited sub application.cfc's and deal with the fact that my application might not be in the root. I came up with this:

<cfset this.name = "APPNAME" />

<cfset this.mappings["/#this.name#"] = getDirectoryFromPath(getCurrentTemplatePath()) />

<cfset This.customtagpaths = "#getDirectoryFromPath(getCurrentTemplatePath())#\customtags\"/>


September 26, 2007 Posted by Terrence Ryan at 5:44 PM

ColdFusion, Web Development,

Max 2007 - BOF

September 24, 2007

I responded to an open call for panelists for one of Brian Meloche's Birds of a Feather Sessions, titled "Fixing ColdFusion Perceptions and Reputation." I'm in.

I looking forward to it, especially since I disagree with a lot of the solutions I hear to solving the problem. A quick preview or my opinions:

  • I don't think Adobe has to give away production-ready ColdFusion
  • I don't think Adobe should sell an IDE.
  • I don't think Adobe should take over CFEclipse (I'm not against them throwing some pounds Mark Drew's way)
  • I don't think magazine or journal articles are the problem

My thoughts aren't fully fleshed out, but I think it has to do with the fact that ColdFusion's niche isn't clearly defined. If you're a Microsoft shop, you use a .Net solution. If you're a startup you use Ruby or PHP. If you see yourself as providing enterprise solutions you use full blown Java. Caricatures to be sure, but I think close to the mark.

I think if you asked most ColdFusion programmers why they use it, they would say, "Because it makes my job easy." But people who like things to be easy, is a sort of hard niche to get a hold of, I mean who doesn't want that.

Anyway, these are just ramblings. Feel free to argue with me either here, or next week in Chicago.


September 24, 2007 Posted by Terrence Ryan at 2:00 AM

ColdFusion, Web Development, adobemax07,

Squidhead 2.0

September 23, 2007

I've been noodling here and there and have finally put the finishing touches on Squidhead 2.0.

Before I started rewriting, I spent some time developing more applications with Squidhead. I figured out a couple areas of inefficiency and tried to fix them when I could. Creating configuration files took longer than it should and was a bit confusing. I found myself writing Ant scripts for all of my applications. I kept forgetting to test my applications.

Further when I was maintaining the actual Squidhead codebase, some things were frustrating. Maintaining a separate code base for ColdFusion 8 and ColdFusion 7 was a pain in the ass. Maintaining a simple version and a business version was a pain. Adding new features required a series of cascading tweaks because it was poorly architected.

So here are the solutions to all of those issues and a few more for good measure.

New features:

  • MySql 5.0 Support
  • It creates Ant Build files for common tasks
  • It can run CFUnit tests that it creates during its build
  • It now will use CF8 rich elements it the generated crud *
  • It now handles images *
  • It's now a little easier to extend
    • It's easy to add steps.
    • It's possible to add application templates
  • Modified XML configuration allows developer to override certain defaults like form field labels.
  • New Configuration Builder
  • New Shiny Web 2.0 looks (Okay, not a feature per see.)
  • Cheesey Web 2.0 Logos created for every application.

* CF 8 features can be turned off if application will not be running on a CF8 server.

Deprecated Features:

  • Simple Applications (They are still available, but they won't be updated)

Removed Features:

  • Threading (Speed Enhancements weren't enough to justify added complexity)

Requirements:

  • Squidhead: ColdFusion 8
  • Database: Microsoft SQL 2000 or 2005; MySql 5.0
  • Generated Application Using MSSQL: ColdFusion 7 or 8
  • Generated Application Using MySql: ColdFusion 8

Notes:

  • For the most part, your old config files will still work. However the more changes you made the more likely they are to have problems.

Old versions of Squidhead still available at http://www.numtopia.com/squidhead.

The new version is available at Riaforge.


September 23, 2007 Posted by Terrence Ryan at 2:35 AM

ColdFusion, Squidhead, Web Development,

Stupid CFImage Tricks

September 21, 2007

web2

I'm not sure if anyone else has done this but, I was fooling around with trying to get <cfimage> to create a Web 2.0 type logo. You know floating text, with a reflection. I figured it someone else has done it. But I couldn't find exactly what I was looking for.

So I did it myself.

Web 2.0 Logo Creator Code


September 21, 2007 Posted by Terrence Ryan at 2:32 PM

ColdFusion, Web Development,

Max 2007 - A Virtual Trading Floor

September 20, 2007

I'd like to highlight a Max 2007 session: A Virtual Trading Floor: Bringing Wall Street to the Classroom. It's being given by a few of my co-workers here at Wharton (Charles Rejonis, Alec Lamon, and Erin Wyher). I'm not sure about the exact topics that they will discuss, but it's about a pretty hardcore application that simulates a trading floor. Consequently it deals in multiple transactions per second on large amounts of unique user data. This application was originally a desktop application written in Visual Basic and running in a controlled lab. After a few unsuccessful attempts (because the technology wasn't there yet,) the Learning Lab team managed to replace the old application with a RIA version using ColdFusion, Flex and Flex Data Services (or LiveCycle Data Services). They ran into a lot of challenges that truly tested the limits of all of the underlying technology.

I highly suggest this session to you all. It's a great story that responds to the argument: there are some things that RIA's can't do. Because here is at least one seemingly impossible thing they can indeed do.


September 20, 2007 Posted by Terrence Ryan at 12:58 PM

ColdFusion, Flex, Web Development, adobemax07,

Max 2007 - I'm in

It was up in the air for a bit, but I'm coming to Max 2007. I had a conflict that I'm also bummed about missing, but a few things came up that made it hard to stay away.

I'm staying at the Palmer House. If anybody is up for meeting up and having some scotch and cigars let me know. I should have a good supply with me.

My tentative schedule is below:

Time Session
Sun 12:45 PM Flight USAIR 1632
Sun 5:00 PM Welcome Reception
Mon 8:00 AM Breakfast
Mon 9:30 AM General Session
Mon 11:30 AM The Design Shootout with Adobe Gurus
Mon 12:30 PM Lunch
Mon 2:00 PM A Virtual Trading Floor: Bringing Wall Street to the Classroom
Mon 3:15 PM Inspire Session: Building Buzzword, a New Breed of Word Processor
Mon 4:30 PM Inspire Session: Lessons Learned on AIR
Mon 7:30 PM MTT: ColdFusion
Mon 8:30 PM ColdFusion Developer Hiring 101
Mon 9:30 PM Fixing ColdFusion Perceptions and Reputation
Tue 7:30 AM Breakfast
Tue 9:15 AM Inspire Session: Yahoo! Presents "Examples of Integration
Tue 10:30 AM General Session
Tue 12:00 PM Lunch
Tue 1:30 PM Adobe Integrated Runtime (AIR) Tips and Tricks
Tue 2:45 PM Inspire Session: Design Patterns and ColdFusion
Tue 4:00 PM Leveraging PDF within Adobe AIR Applications
Tue 5:30 PM Sneak Peak General Session
Wed 8:00 AM Breakfast
Wed 9:00 AM Boot Camp for Flex
Wed 12:00 PM Lunch
Wed 1:45 PM XD: Best Practices for Creating Great Web Experiences
Wed 3:00 PM Optimizing ColdFusion Application Performance
Wed 4:15 PM Adobe Integrated Runtime (AIR) Security
Thu 12:50 PM Flight USAIR 1564

September 20, 2007 Posted by Terrence Ryan at 12:57 PM

ColdFusion, Web Development, adobemax07,

CFUnit and CFAnt

September 19, 2007

I'm working on some improvements to Squidhead, and a few of them relate to Ant. The new version of Squidhead creates Ant build files. In addition to Ant tasks for rebuilding and refreshing the application, there is also one for running all of the CFUnit tests that Squidhead creates.

Since I'm trying to highlight the ability to add steps to Squidhead applications, I was thinking that it might be cool to not just write the tests as part of the Squidhead build, but also run the tests as part of the Squidhead. Including the ColdFusion autorunner for the reports didn't work. Because both CFunit and Squidhead rely on <cfflush>. So I fired up CFAnt to see if it would run. It didn't. It through an error that stated: BUILD FAILED… askdef class net.sourceforge.cfunit.ant.CFUnit cannot be found.

I copied the version of cfunit-ant-v3-alpha.jar I use with Eclipse to my ColdFusion8/lib directory, restarted the server and voila: BUILD SUCCESSFUL.

Ant in ColdFusion is cool.

Oh and I imagine the same tip would help you to run CFCUnit tests to run from <CFAnt>


September 19, 2007 Posted by Terrence Ryan at 1:49 AM

ColdFusion, Squidhead, Web Development,

New Host

September 17, 2007

Over the weekend I got a notice that my hosting account with my old vendor had expired, and that it was time to renew. I had a lot of sitting around and waiting time this weekend, so I decided to consider if I should go with a different host. After much deliberation, I decided to switch to YoHost. I switched for the following reasons:

After being bought by a larger company, my old host's support took a slight downturn in promptness. I had read good things about the customer service of YoHost. (So far they are all true.)

YoHost had ColdFusion 8 hosting available.

For slightly more than the cost of 2 sites at my old host, I have a plan that provides me with 10 sites. I appear to be completely over, but who knows what glitches await me.


September 17, 2007 Posted by Terrence Ryan at 12:52 PM

ColdFusion, Web Development,

Quasi-Popular?

September 13, 2007

I followed the link Peter Bell offered today of the rundown of various web frameworks. I kept following to the Wikipedia article for my particular favorite framework, Model-Glue. Where I discovered this line:

Written by Joe Rinehart, a quasi-popular ColdFusion blogger…

Really, quasi-popular? That seems a bit awkward not to mention inaccurate.

Joe, you're at least semi-popular in my book.


September 13, 2007 Posted by Terrence Ryan at 11:54 AM

ColdFusion, Random, Web Development,

Airifier

September 12, 2007

Caught this on MXNA earlier today so sorry if you are seeing this twice. Want to "Airify" any website. Like Gmail, or FullasAGoog? Try Airifier from Arc90. It's great for making a proof of concept of a site to see if it would be appropriate to spend resources on making it an Air application.

September 12, 2007 Posted by Terrence Ryan at 2:58 PM

ColdFusion, Web Development,

More XHTML Compliance Issues in ColdFusion 8

September 11, 2007

I ran into a problem recently where a completely valid XHTML 1.0 transitional site was rendered incompliant by the addition of <cfmenu>. It seems that <cfmenu> causes compliance to fail in two ways:

First, it adds JavaScript to the "OnMouseOver" and "OnMouseOut" attributes of its menu items. To be compliant, it should be adding them to the "onmouseover" and "onmouseout" attributes. There's an easy fix to this. Inspired by Ben Nadel's post on altering the output of the writeToBrowser feature of <cfimage> I just used <cfsavecontent> to capture the menu, and then alter it, as listed below:

<cfsavecontent variable="menuContent">

<cfmenu name="menu" type="vertical">

<cfmenuitem name="home" href="index.cfm" display="Home"/>

</cfmenu>

</cfsavecontent>

<!--- These calls help bring page to XHTML compliance. --->

<cfset menuContent = Replace(menuContent, "OnMouseOver", "onmouseover", "ALL") />

<cfset menuContent = Replace(menuContent, "OnMouseOut", "onmouseout", "ALL") />

<cfoutput>#menuContent#</cfoutput>

But that doesn't hit the other problem, which is that any of the Ajax capable tags seem to add the following bit of code to the top of a page:

_cf_loadingtexthtml="<div align='center'><img src='/CFIDE/scripts/ajax/resources/cf/images/loading.gif'/>"

This screws up compliance on two fronts:

  1. The div created in that code isn't closed.
  2. The img created in that code doesn't have a alt tag.

Now the interesting thing here is that isn't actually a div that's created, it's only JavaScript that will at some point create those elements. I think technically the compliance test is falsely marking this as a violation. But try explaining that to a client who demands compliance without understanding the theory behind it.

Anyway, I can't find a single way around this. Using the OnRequest method of application.cfc was my best bet. I figured I would use to call <cfsavecontent> and replace the offending code like I did above. Unfortunately, this spot of code is directly written to the buffer when <cfmenu> gets called.

I also tried a few getPageContext() functions, but to no avail. I'll be stuck trying to explain this to the client. In the meantime, I filed a bug report with Adobe.


September 11, 2007 Posted by Terrence Ryan at 1:29 PM

ColdFusion, Web Development,

ColdFusion 8, Verity and Vista

I've been having an issue with a quick and dirty development server I setup for a project. I couldn't get Verity operations to run. I checked and low and behold there was no Verity Service installed. I reinstalled ColdFusion, but still no "ColdFusion Search Service" showed up.

I tried the super secret verity_uninstall and verity_install bat files, but still no joy.

Then I tried what I should have thought of in the first place. I right clicked verity_install.bat and chose to run as administrator. That did the trick; Verity is now completely working.


September 11, 2007 Posted by Terrence Ryan at 12:05 AM

ColdFusion, Web Development,

Formal code reviews: When and how often?

September 10, 2007

Nathan Mische asked a really good set of questions in response to my code review presentation posting. I figured that I would give a longer answer than really works in a comment.

First it's important to point out that formal code reviews are part of a suite of quality assurance techniques. They do not preclude the use of any other, including application design, informal code reviews, testing, etc.

But formal code reviews, a whole bunch of people looking at all of the code, and then having a long meeting discussing it, are relatively expensive. They take a good deal of time from many people who are probably working on their own code, and incurring the cost of context switching by doing so. So my guideline for code reviews is once per major revision of the application. Basically, if you spend a few days doing an update on an application that has already been reviewed, then you probably don't need a formal review. If you and a team of developers spend 4 months doing a revision to the code, a formal review is probably in order. Those are the extreme cases; your organization will have to choose where in between to draw the hard fast line.

As for when to do them… We at Wharton do them basically right before the application moves from development to production. This is also the time when we try the application out on the staging server. The timing is dictated by how we've mandated code reviews. To get your application on our production ColdFusion servers you must go through a code review.

Is that the best time? I'm not really sure. I think if you design correctly, unit test, informally review code, and get user feedback from your clients, then it is the right time to do the review. But we don't always do all of that so I get the subtle feeling that earlier might be better, but we'll just have to deal with the timing forced by our mandate.

Anyone else have any opinions on this?


September 10, 2007 Posted by Terrence Ryan at 12:35 PM

ColdFusion, Web Development,

Code Review Presentation

September 9, 2007

Back in June, I gave a presentation on formal code reviews to the Philadelphia CFUG.

I've had it ready to share for a while, but I hadn't gotten around to it until now. Enjoy.

Code Review Presentation Given to Philadelphia CFUG


September 9, 2007 Posted by Terrence Ryan at 3:48 AM

ColdFusion, Web Development,

Wharton Hiring Again

September 5, 2007

Dave Konopka has a post over at his site about a ColdFusion position that is open at Wharton Computing at the University of Pennsylvania, in Philadelphia PA. He's looking for a junior level ColdFusion developer, but will consider hiring a PHP, Ruby or .Net developer and retraining.

I had the pleasure of working with Dave for a little over a year and half, and let me say that Dave's an amazing guy with which to work. Also, he took the .Net programmer retrained in ColdFusion route, so he's not fooling around about accepting other technologies. So if you're even thinking about it, I say take him up on his offer and drop him a line.

See his post for details.

If you want to see what kinda stuff we're all into at the Wharton School, check at the Wharton Computing Developer's Center.


September 5, 2007 Posted by Terrence Ryan at 2:53 AM

ColdFusion, Web Development,

Movable Type 4

September 1, 2007

I updated the blog here to Movable type 4. It was extremely painless. It even inspired me to fix a whole bunch of stuff that was wrong with it. Specifically email subscriptions to entries now work.

The new backend it very cool. It took me a little getting used to, but now that I've got the hang of it, I'm extremely pleased. There's a lot of new features, and I'm looking forward to giving them all a try.


September 1, 2007 Posted by Terrence Ryan at 2:52 AM

Meta Blogging, Movable Type, Web Development,