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.

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.

Formal code reviews: When and how often?

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?