| By Carey Lilly | Article Rating: |
|
| June 7, 2001 12:00 AM EDT | Reads: |
6,841 |
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>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:
<cfset kilometers = evaluate( miles * 1.61)>
<cfx_kmConvert V=kilometers F=Length VALUE=2 FROM=mi TO=km FORMAT="%.2f km">In the example above, we're doing the following:Result: 3.22 km
- Using the Convert module
- Setting the output variable (kilometers)
- Specifying the conversion function to be performed (length)
- Setting the value to be converted (2)
- Specifying that the conversion be from miles to kilometers
- 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.
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.
Published June 7, 2001 Reads 6,841
Copyright © 2001 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By 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.
- Adobe’s Aiming ColdFusion at Multiple Clouds
- Cloud Computing Journal: Adobe to Deliver ColdFusion in the Cloud
- Adobe May Cooperate with Apple to Transplant Flash Player to iPhone
- Adobe Flex Developer Earns $100K in New York City
- Adobe LiveCycle Enterprise Suite 2 for Cloud Computing
- Adobe Betas Target RIAs and Cloud Computing
- Adobe Cans Another 9% of its Workforce
- Moyea DVD4Web Converter V2.0 Converts DVD to FLV Fast and Synchronously with Watermarks
- Adobe & Salesforce Cut Cloud Deal
- Adobe Fiddles with its Web Apps
- Hosting.com Launches ColdFusion 9 in the Cloud
- The Real Time Infrastructure Ultimatum
- Adobe’s Aiming ColdFusion at Multiple Clouds
- Eval JavaScript in a Global Context
- Fig Leaf Software to Exhibit at Government IT Conference & Expo
- Cloud Computing Journal: Adobe to Deliver ColdFusion in the Cloud
- Is Microsoft as Free as Open Source?
- Adobe Reader Sued
- The Planet Named “Bronze Sponsor” of Cloud Computing Expo
- Microsoft Expression Web Has Got Game
- Adobe May Cooperate with Apple to Transplant Flash Player to iPhone
- Adobe Flex Developer Earns $100K in New York City
- Bruce Chizen Joins Voyager Capital as Venture Partner
- My Top Seven Wishes From Adobe MAX 2009
- The Next Programming Models, RIAs and Composite Applications
- Where Are RIA Technologies Headed in 2008?
- Constructing an Application with Flash Forms from the Ground Up
- AJAX World RIA Conference & Expo Kicks Off in New York City
- CFEclipse: The Developer's IDE, Eclipse For ColdFusion
- Personal Branding Checklist
- Adobe Flex 2: Advanced DataGrid
- Has the Technology Bounceback Begun?
- Building a Zip Code Proximity Search with ColdFusion
- i-Technology Viewpoint: We Need Not More Frameworks, But Better Programmers
- The Asynchronous CFML Gateway
- Web Services Using ColdFusion and Apache CXF





















