Max 2007 – BOF

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.

Squidhead 2.0

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.

Max 2007 – A Virtual Trading Floor

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.

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

CFUnit and CFAnt

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>

New Host

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.

More XHTML Compliance Issues in ColdFusion 8

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.