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?

Wharton Hiring Again

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.

Movable Type 4

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.

ColdFusion 9 and AIR

I think ColdFusion 9 should be able to produce AIR applications.

Oh wait, I’m should probably preference this I love ColdFusion 8, and I think it’s great and the CF team deserves a rest. I do, I do, and they do. I’ve been holding on to this idea ever since the Philadelphia stop of the AIR Bus tour, and if I don’t get it out unfinished, I’ll never get it out there.

Okay, so back to ColdFusion should be able to publish AIR applications.

ColdFusion is cursorily related to so many of the technologies that surround AIR. ColdFusion provides an easy webservice infrastructure you need to run remote Flex applications. These remote Flex applications can just as easily be AIR as Flex. ColdFusion 8 can now generate rich controlled HTML and JavaScript driven applications. Just like the kind of applications that can be packaged as AIR applications.

But the direct linkage between ColdFusion and AIR is missing. Its can help but only as an unglamorous background player. It shouldn’t be, especially when it can produce so much of what AIR is made from.

I can envision setting something in Application.cfc like This.publishAsAir = TRUE. When the application url is browsed the ColdFusion server compiles all of the CF JavaScript libraries that are used in the application, and adds every page that is specified in another application.cfc setting, and builds it as an AIR file.

  • How would this work with applications that aren’t page based but url string based (like framework based applicaitons)? I have no idea.
  • How would this deal with pages driven by database results? I have no idea.
  • How would it hande all of the backend activity of tags like <cfmail> or <cfldap>? I have no idea.
  • Would this be really hard to do? Probably, but have you seen what they’ve done with CF 8?

I’m thinking maybe there would be some way of limiting what gets created as the AIR components. Maybe you would have to wrap all of the application parts you wanted to use in a <cfair> tag, and it would prevent the calling of certain tags within it? I have no idea.

So am I nuts, or are the obstacles too high with this?

Want to crash a CF server?

I found a new way to make your administrators life hell.

  • Create an application mapping to a custom tags directory.
  • Put a custom tag named “doSomething.cfm” in it.
  • Create a ColdFusion page named doSomething.cfm in your application root.
  • Call <cf_doSomething.cfm> in that page.
  • Browse to that page.
  • Watch your ColdFusion server die

I kinda feel like I shouldn’t bother with a bug report because, well, it was a pretty stupid thing for me to do. And in fairness, it won’t crash, it just can’t do anything while it’s processing that infinite loop.

Squidhead Future

I’m doing some serious thinking about the future of Squidhead, and I some stuff I wanted to run by the small but plucky group of Squidhead users that are out there.

It’s gotten a little unwieldy to do updates for both a ColdFusion 7 and 8 version of the feature set. Additionally, the whole business objects and non-business objects version is also getting hard to support. Finally, there are a whole bunch of features I would like to support but require ColdFusion 8. So here is what I am proposing:

  • Ceasing development of the current version of Squidhead.
  • Starting a new development track that required ColdFusion 8 for application generation. (But then generated application could run on ColdFusion 7.)
  • Dropping the non-business objects version of the code.

Once I did that, I could do the following:

  • Switch database analysis over to use <cfdbinfo> for most, but not all of what I do.
  • This would make adding support for other DBMS’s easier

I’d be happy to hear any feedback you might have on these proposals. Assuming no one objects, I would publish one last version of the old code as 1.0, and then start pruning and working on what I would call version 2.0. (I would also come up with a more standard versioning system.)

IE, cfcache and XHTML Strict Don’t Mix

I ran into a little problem today, and haven’t figured out a way around it yet.

I had a page that is slow but changes rarely, a textbook case for <cfcache>. So I added the caching statement, and ran it. It looked perfectly fine in Firefox. I went to look at it in IE 7, and the CSS was screwed up (supposed to be a centered aligned design, now all the way to the left).

I couldn’t figure it out. I looked at the source code, no differences. Finally I ran a comparison on the two page sources, and discovered that <cfcache>seems to add a ColdFusion style comment containing the url of the page into source, above the doctype declaration. I couldn’t see how that would cause the problem, so I submitted the source to the W3 Source validation service. It informed me that the comment style invalidates the page, because I was using XHTML 1.0 Strict.

As I see it, my workaround is to set the page to XHTML 1.0 Transitional, or stop using <cfcache> on this page.

Subfolders and Application Custom Tags

I love the new Custom Tag Paths in Application.cfc feature of ColdFusion 8. In fact I love it so much I’m using it everywhere now. I did run into one problem though. I tried calling an application mapped custom tag from sub folder without its own Application.cfc. The custom tag call bombs. I added an application.cfc that extended the application’s root application.cfc, and still no joy. I had to explicitly set the custom tag mapping in the child application.cfc to get it to work.

No big deal, but I figured I would share it.