YOUR FEEDBACK
sahil wrote: help
AJAXWorld RIA Conference
October 20-22 San Jose, CA
Register Today and SAVE !..


2008 East
DIAMOND SPONSOR:
Data Direct
Frontiers in Data Access: The Coming Wave in Data Services
PLATINUM SPONSORS:
Red Hat
The Opening of Virtualization
Intel
Virtualization – Path to Predictive Enterprise
Green Hills
IT Security in a Hostile World
JBoss / freedom oss
Practical SOA Approach
GOLD SPONSORS:
Software AG
The Art & Science of SOA: How Governance Enables Adoption
PlateSpin
Effective Planning for Virtual Infrastructure Growth
Fujitsu
Automated Business Process Discovery & Virtualization Service
Ceedo
Workspace Virtualization
Click For 2007 West
Event Webcasts

2008 East
PLATINUM SPONSORS:
Appcelerator
Think Fast: Accelerate AJAX Development with Appcelerator
GOLD SPONSORS:
DreamFace Interactive
The Ultimate Framework for Creating Personalized Web 2.0 Mashups
ICEsoft
AJAX and Social Computing for the Enterprise
Kaazing
Enterprise Comet: Real–Time, Real–Time, or Real–Time Web 2.0?
Nexaweb
Now Playing: Desktop Apps in the Browser!
Sun
jMaki as an AJAX Mashup Framework
POWER PANELS:
The Business Value
of RIAs
What Lies Beyond AJAX?
KEYNOTES:
Douglas Crockford
Can We Fix the Web?
Anthony Franco
2008: The Year of the RIA
Click For 2007 Event Webcasts
SYS-CON.TV
TOP COLDFUSION LINKS


cfx_kmSuite From Hopkins Technology, LLC
cfx_kmSuite From Hopkins Technology, LLC

Being thrifty, I like to do my own basic car repairs. However, on some of my shade-tree repair jobs, I've run into the problem of not having a specific, but necessary, tool.

I often find myself in the same predicament developing applications for my clients' Web sites. I'm cruising along, happily coding away, when out of the blue I suddenly need to do something I've never had to do before.

ColdFusion, of course, makes it easy when you run into a problem. You just write a custom tag to do the job, throwing in Java or anything else that catches your fancy, and continue on with life. Sometimes, though, deadlines loom and budgets are tight. That's when you find yourself haunting the CF Tag Gallery or Java sites, trying to find that quick-and-dirty (and most especially, free) function to get you back on track. It would save a lot of time if some common functions were collected and ready to go, right?

The cfx_kmSuite from Hopkins Technology, LLC, has a number of useful functions, rolled together into a few CFX tags. If you're self-hosted, colocated, or at least on a dedicated server, you may want to consider this suite. Those of you who (like me) are hosted at national providers may not see this suite, since it includes some potentially hazardous system-access functions.

I suppose to call the cfx_kmSuite tags is too simple. It's more like a collection of modules, grouped by function (system, math, string, etc.). Each module will accept parameters to determine the function you'd like to perform.

How to Call Functions
When I first viewed the online documentation, for a moment I didn't comprehend that I was looking at a collection of modules covering 12 subject areas: Calendar, Convert, Format, Graphic, HTML, List, Math, Misc, Query, Security, String, and System.

Take, for example, Convert. These functions convert from English to metric and back. Now I suppose you could write a chunk of code that converts miles to kilometers:

<cfset miles = 2>
<cfset kilometers = evaluate( miles * 1.61)>
In cfx_kmSuite, the cfx_kmConvert tag lets you do this, as well as mass, volume, area, and temperature conversions. In the suite, the function could be called as:
<cfx_kmConvert V=kilometers F=Length VALUE=2 FROM=mi TO=km FORMAT="%.2f km">

Result: 3.22 km

In the example above, we're doing the following:
  1. Using the Convert module
  2. Setting the output variable (kilometers)
  3. Specifying the conversion function to be performed (length)
  4. Setting the value to be converted (2)
  5. Specifying that the conversion be from miles to kilometers
  6. Specifying the format of the output: (%) = the result, (.2f) = 2 fixed decimal places, (km) = text label for the formatted output. This frees you from the Number-Format() function.
This Convert example is typical of the functions in the suite, depending on the complexity of the task. It frees you from constantly writing those same little (and a few not-so-little) chunks of code to handle the job. It may even include some you've always wanted.

For instance it may be just as easy to haunt the Tag Gallery for a tag that validates a 16-digit credit-card number. If that's all you're looking for, then this suite is not for you. For serious developers, the suite expands on a few existing CF tags. cfx_kmList, for instance, duplicates the list functions that already exist. Included, however, is the ListBestMatch function, which uses a similarity algorithm to find an item most like a supplied value. Or consider the ListIntersection function, which compares two lists and returns a third showing items found in both (perhaps finding which items in your online store were most popular this month).

A Really Neat "Almost" Mini-App
I was doing a Web site for a local art gallery some time ago. They requested a calendar of events, and asked that it be made available ASAP. If cfx_kmSuite had been available, it might have saved some headache.

Included with the suite is an innocuous-sounding function called BasicMonth. When I first saw it in the documentation, I thought it was fairly cool: give it a date, and it creates an HTML table for that month. What was even cooler was that you could specify an HREF for each day, thus creating a link to another page (presumably to display an event for that day). Here, half-built and just waiting for a database table and a little code, was a compact events calendar that could be easily inserted into an existing site design or application.

Conclusion
Since these tools are in compiled DLLs, you'll need to have access to your server. As I mentioned at the outset, the suite includes system-access functions that may make some hosts a little leery. Check with your provider and see if they would install this suite.

If you have your own server, rejoice! The tools you need to finish (or perhaps start) the job are close at hand!

VITALS
cfx_kmSuite
Hopkins Technology, LLC

Address: 421 Hazel Lane
Hopkins, MN 55343-7116

Web: www.hoptechno.com/kmtools/

E-mail: kmtools@hoptechno.com

Test Environment:
Windows 98 with Personal Web Server and CF4.5

Pricing: A perpetual license is available for purchase at $250 for one server ($49 each additional at a single physical site) including e-mail and Web support. Once payment clears, we will send download URL and Key.

About Carey Lilly
Carey Lilly is an associate with a Web site– development firm based in the New York area. He has been developing with ColdFusion since 1997 and has 10 years’ experience with relational databases.

CFDJ LATEST STORIES . . .
Kevin Lynch, who will be keynoting on October 21, 2008, helped originally coin the term "Rich Internet Application" in 2002. He has been at the center of innovation in Flash and Adobe AIR since their inception, and currently drives Adobe’s technology platform for designers and develo...
Rich Internet Applications offer the potential to fundamentally change the user experience and in doing so, yield significant business benefits. The theme of this October's AJAX World Conference & Expo 2008 West is 'Beyond AJAX to the RIA Era' and the Call for Papers, which is still op...
Join Scott Guthrie as he discusses Microsoft’s commitment to web standards development, Rich Internet Applications and how Microsoft is contributing to help move the web forward. Join Adobe’s Kevin Lynch as he demonstrates how Flash and HTML come together to make the most engaging,...
Virtualization has become a critical part of Enterprise IT strategy. Why and how has it become one of the most important change agents in our industry? To answer these questions I had the good fortune recently to be able to speak to a select group of top IT industry executives who join...
SQL Injection attacks are one of the easiest ways to hack into a website. One recent hack, using a script from verynx.cn, involves injecting sql into a web form that then appends some JavaScript code into fields in a database that then gets executed on the client side when a user views...
Recursion Software released a private beta version of their Voyager mobile platform, with powerful interoperability for Android, Microsoft .NET and Compact Framework (CF), all Java editions (JME CDC, JSE and JEE), and more than 15 embedded operating systems. The Voyager platform is a p...
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS
SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021


SYS-CON FEATURED WHITEPAPERS

MOST READ THIS WEEK
ADS BY GOOGLE