August 27, 2007
ColdFusion is the next FrontPage
Web professionals around the world rejoiced when Microsoft recently announced that they were discontinuing their infamous FrontPage WYSIWYG web authoring program. FrontPage, which was designed to make web site creation as easy as word processing, was scorned by web professionals due to the non-standard, proprietary Microsoft spaghetti HTML code that it generated. Many people could identify a web site created with FrontPage at first glance and the program and the sites that it created quickly became synonymous with amateur, wannabe web designers.
Unfortunately, the old FrontPage is now being replaced with a new “FrontPage.” Only this time it’s called Adobe ColdFusion 8. With the recent release of version 8, ColdFusion is being trumpeted as the quickest and easiest way to web applications. Sound familiar? Just replace “web application” with “web site” and you’ve got almost identical product slogans. What FrontPage attempted to do for static web sites, ColdFusion is trying to do for dynamic web applications. But this slogan doesn’t necessarily make ColdFusion a bad thing. Let me explain a little bit…
I use ColdFusion every day at work as a web application developer for the City of Portland. And I love ColdFusion because I honestly do believe that it is the quickest and easiest way to build powerful web applications. So when version 8 was recently released I was thrilled to learn about the new Ajax features designed to make building Ajax enabled applications easier than ever before. Having already built a couple of Ajax enabled web apps “the hard way” I was curious to see how well ColdFusion was able to simplify the process.
“Wow!” I said to myself as I hit the view source button in my browser, “Let’s see how they did it…”
It was at this point that the music suddenly stopped, the lights began to dim, and the smile quickly faded from my face. I’m a big advocate of standards-based web development and I usually try to create pages that conform to the XHTML Strict doctype. The first thing that I noticed was that while the HTML code that I’d used was valid, there were several validation errors in the ColdFusion generated code.
It seems that when it comes to creating a web site, whether it’s a static web site or a dynamic web application, if you want it done right you’ve got to do it yourself. This includes hand coding your HTML and handling the nitty-gritty details of Ajax enhanced web sites. This brought me to the conclusion that ColdFusion is just the next FrontPage. No doubt the new Ajax features will get used and abused by the less knowledgeable developers looking for the quick and easy solution. But smart developers who care about web standards and take pride in creating clean, semantic, valid HTML will do things the way they’ve always done them in the past—by hand. So the next time your tempted to use on of the new ColdFusion features that magically does everything for you, take a look behind the scenes at what’s really going on and evaluate if it’s really the best way to accomplish your task. You may find yourself joining me and doing it the hard way. But at least it will get done the right way!
P.S. Adobe, if you’re listening, it’s not too late! I’d love to be surprised by the next ColdFusion update to discover that you’ve fixed these issues that you’re putting forth an effort set a good example and do things the right way. If so, I promise I’ll never mention ColdFusion and FrontPage in the same sentence again!
August 20, 2007
Firefox tweak: Spell check any text field
Here’s an easy Firefox tweak to enable spell checking of single-line text fields. (By default, only multi-line text boxes are spell checked.)
- Type about:config in the address bar and press enter
- In the filter field type layout.spellcheckDefault
- Double-click on the entry and in the pop-box enter 2
- Click OK
- Restart Firefox
August 15, 2007
Automatically stretch Webshots backgrounds
I recently upgraded from an old 19" CRT monitor to a 19" widescreen LCD monitor. While the widescreen is great for watching movies, my Webshots desktop backgrounds don't fit the new aspect ratio very well.
By changing the background properties from center to stretch I could force Windows to resize the background to fix the screen. Although this slightly distorts the picture, I found that I preferred it to the black bars normally on the left and right sides of the picture. The only problem is that every time Webshots changed the background picture, it would change the background setting back from stretch to center.
I finally found a way to automatically "stretch" the background pictures after Webshots changed them. I found a very useful program called AutoIt. According to their web site, "AutoIt is a freeware Windows automation language. It can be used to script most simple Windows-based tasks."
I wrote a little script that changes the wallpaper mode to stretch. Then I used the compiler that comes with AutoIt to compile the script into an executable .exe file. Then I created a scheduled task that runs the executable every minute.
So now when Webshots changes the background, it will automatically get stretched within a minute when the scheduled script runs.
; AutoIt Version: 3.0
; Language: English
; Platform: Win9x/NT
; Author: Richard Davies
; Script Function:
; Changes wallpaper mode to 'stretch'.
$pos = RegRead("HKU\S-1-5-21-1645522239-2139871995-725345543-1003\Control Panel\Desktop", "WallpaperStyle")
If $pos <> 2 Then
; Load display properties
Run("control desk.cpl display,,2")
; Wait for it to load and make it transparent
WinSetTrans("Display Properties", "", 0)
; Set wallpaper mode to stretch
; Close window
The registry string in the second line is your SID. You can use the PsGetSid utility to find your SID.
Update: See Automatically stretch Webshots backgrounds redux for an improved (and Vista compatible) method of accomplishing this task.