Dr. UI or: How I Learned to Stop Complaining and Love TWC

So maybe it's because I've been doing a lot of UI work lately, or maybe it is because Jeff Peters and Hal Helms have been talking about user interfaces on their podcast, but for whatever reason I've been taking greater notice of interfaces over the past few weeks. It really interesting just how bad some interfaces can be, and how sometimes, just one feature can really make or break a user experience. Case in point my cable box. Here in Philadelphia I have Comcast. When I first moved into my new house a few months ago and called to set up my service I was really surprised that human answered the phone within about 10 seconds of dialing. I'm most familiar with Time Warner Cable in New York where you usually had to try to talk to a machine for 5 minutes before getting fed up and pressing 0 or screaming "Operator!," only to be put on hold for another 30 minutes before you could finally talk to someone. And once you did get a human on the line they usually sounded like they were doing you the biggest favor in the world by talking to you. So anyway, at this point I though Comcast really had it together. However once I finally got my HD/DVR digital cable box (made by Motorola) and started using it, well that is where the love affair ended. I've actually had to call customer service three times in a little less than three months due to the horrible interface this box has.

[More]

Fusebox on the ColdFusion Weekly

I just got around to listening to last week's ColdFusion Weekly Podcast, Version 1.25, The Fusebox 5 Edition. (For some reason I got a week behind on listening to the Weekly a few months ago and still haven't managed to catch up.) All in all I think it was one of the better versions I've heard. I think Sean Corfield gave a rather compendious overview of the history of Fusebox as well as a great description of the goals and new features of Fusebox 5. However, as a long time Fusebox user I was a little surprised by one of the questions asked. Toward the end of the interview Matt Woodward asked if Fusebox could be used to build OO CF applications. The answer of course was yes. What surprised me is that Fusebox has never really prevented users from building OO applications using the framework. Most of the major frameworks use .cfm templates for the view layer, and Fusebox is no exception. (The only framework I can think of right now that uses components for display is FarCry.)

Case in point, I'm currently working on an addition to an existing application. This new feature set is based on a fully OO domain model, managed by ColdSpring, and oh yeah, it uses Fusebox 2 as the controller. That's right, Fusebox 2. If anyone remembers how FB2 works, I instantiate my ColdSpring bean factory in the app_locals.cfm file for the new circuit, make calls to my service components (via ColdSpring) from ACT files and render the display via DSP files. Sure if I had my choice I'd be using a more modern framework but in this case I didn't. Modern frameworks have many conveniences that make OO development easier, and if you are building a new application I certainly recommend using one, but you don't have to use a framework to build OO apps in ColdFusion, and you can certainly use Fusebox if you want to. Anyway, I'm not really sure where Fusebox got the bad rap as it relates to CF and OO but I hope some people are taking a second look at Fusebox with this new release and realizing it can be used for both procedural and OO applications.

ColdFusion Positions in NYC

My former employer, nextjump inc., is looking for developers. If you are a CF developer and looking for a job in the NYC area drop them a line. (And be sure to let them know you found them through my blog!) Nextjump is a great company with tons of energy and some very smart people. In my time there I learned a lot about not only enterprise software development but also the business of technology. Here is a bit more about the position (from their website):

DESCRIPTION:

Associate Developers will work closely with Product Managers to prototype new web-based applications for our clients, in a fast-paced rapid development environment.

REQUIREMENTS:

  • BS in Computer Science, Engineering or equivalent
  • 1 - 2+ years experience with web development
  • Cold fusion and JSP
  • Excellent oral and written communication skills
  • Extremely detail oriented

I Now Work for ADP

I couldn't blog about this until today, but as of yesterday I officially work for ADP. The company I work for VirtualEdge was bought by ADP, so I've gone from working for a company of about 100 employees to a Fourtune 500 company of with over 40,000 employess. Things should be interesting over the coming weeks and months!

Comparing Queries in Query Analyzer

Often times there are several different ways to write a SQL query to return a desired result set. Some times the ordering of JOINs and WHERE predicates or the approach taken in the query (nested queries vs. joins for example) can make a big difference on query performance. You won't really notice a difference on smaller databases, but on queries which search thousands or millions of records you may see a big difference in performance simply by changing the order of where predicates. So the question becomes, when given two or more queries which return the same results, how do you determine which one performs best?

Well if you are using MS SQL Server just copy the queries into the same Query Analyzer window, turn on the Show Execution Plan (Ctrl+K), and run the queries (F5). Once the queries execute go to the Execution Plan tab and note their relative costs. For example if you run two queries you may have results which look something like:

Query 1: Query cost (relative to batch): %60.00
.
.
.
Query 2: Query cost (relative to batch): %40.00
.
.
.

In this case you would want to go with Query 2 as it has the lowest cost relative to the batch.

Another thing I should point out here is that some times you will notice that two seemingly "different" queries have the exact same cost relative to the batch. If you look at the execution plan you may notice that the query optimizer generated the exact same execution plan for these queries. In these cases it may not make much of a difference which query you choose. (This happened a me a couple of weeks ago. I had 4 different versions of a query, each of which was optimized to the same execution plan by SQL Server's optimizer.)

Anyway, I'm sharing this little Query Analyzer tip because I discovered that not a lot of CF developers are aware of this feature, or at least not as many as I though would be. Also, I'm relatively new to SQL Server so feel free to chime in with any other Query Analyzer tips you may have.

The Yahoo! User Interface (YUI) Library

Whenever talking about AJAX the conversation always seems to come around to JavaScript libraries for working with the DOM and XMLHttpRequests. Some of the more popular open source libraries are prototype, script.aculo.us and dojo, but lately I've been doing a lot of work with the Yahoo! User Interface (YUI) Library. I chose to use this library on a recent project for several reasons.

First and foremost I needed a tree control, which the YUI has. Actually the library contains several components which Yahoo classifies as either utilities or controls. So far I've been working with the DOM Collection (for DOM scripting) and Connection Manager (for AJAX) utilities as well as the Menu and TreeView controls, but these are just a few of the available components.

Second, Yahoo released the YUI library under the BSD license earlier this year. While I'm no open source licensing expert it's my understanding that the BSD license is one of the more permissive free software licenses, which is great because that means I can use it at work.

Third, the library has excellent documentation, especially when compared to some of the other open source JavaScript libraries out there. Not only are there plenty getting started pages and examples but there is also full API documentation for each of the components. (The documentation is similar to the Java API docs.)

Finally there is a strong community over at ydn-javaScript on Yahoo! Groups. The group appears to be very active and any questions I've had so far working with this library have already been answered on this list.

So, if you are evaluating JavaScript libraries for a future project, be sure to give the YUI a look.

BlogCFC was created by Raymond Camden. This blog is running version 5.8.001.