How to Customize An Application

Today's been an interesting day for me.

I found myself rereading this old blog entry from Jason Delmore from last year. It was about why Adobe doesn't give ColdFusion away for free like PHP or Ruby, which of course people still debate today although there's not really any reason to debate it anymore with there now being three separate free CFML engines in various stages of development (Railo, Open BlueDragon and SmithProject) and an upcoming CFML language standard committee.

Whatever your opinion on the idea of standards or for that matter committees, you can't argue that 2008 was anything but an eventful year for the ColdFusion community. Some of the news is just caching up to us like the announcement of the beta for the new Bolt IDE for ColdFusion. The community spoke and Adobe listened. Announcements regarding the features of CF9/Centaur (such as Hibernate ORM) are of course similarly exciting. And then there have been all the wow events in the community like Railo announcing their becoming part of the JBoss project and becoming free/open-source and Kristen Schofield announcing the free educational licensing for ColdFusion and releasing the evangelism kit that finally arms us with some great information for evangelizing the platform, allowing you to "be your own Ben Forta" as she described in her Max presentation. :)

These are all great things for the ColdFusion community, they will be great things for the CF Open Source community generally and personally I know they will be great things for the onTap framework community specifically as we grow rapidly over the next year or two.

ColdFusion is a bit unusual in the way it does things. Although it's not without its challenges as is the case with any language, CF has often been the first in new areas. Notably, CF was the first server of its kind to connect the web to databases seamlessly and easily over ten years ago when Allaire released the very first version. The onTap framework today is in some ways following in that pioneering spirit and right now I'd like to show you a few specific features that make it truly unique in today's CF open source community.


New Members onTap Plugin Build

Oops! It looks like when I made some recent changes to the member management plugin to take advantage of some of the new features in DataFaucet, I somehow accidentally got the addManyToManyRelationship() call into the member.cfc twice. Which in my case caused an error when I tried to install with a clean database. I guess I also neglected to test the installation into a fresh database, so that's my bad... There should probably be mxUnit or some other testing framework for these things, but TDD has been on my growing "when I have time" list for a while. In any event it was easy enough to fix, so I fixed it and uploaded a new build both to RIAForge and to the web service. So if you've been unable to install the Members onTap plugin recently, you can follow these steps to download the new build and try the installation again.

  1. open up your plugin manager (http://[ontap]/admin/plugins)
  2. select the "more" tab
  3. hit "search"
  4. find the Members onTap plugin in the list and hit "install"

Members onTap Incremental Build

I just uploaded a new zip archive of the Members onTap plugin that resolves the missing region input issue.

Two New Builds

So I was working on my contact system and I wasn't entirely happy with the performance of a particular page and started timing portions of the page to figure out where I could tune it to get the response time down. It turned out that one of the bigger sources of the overhead was in the display of region names. It's part of the Members onTap plugin, there's a RegionManager object which manages geographic regions from the country down to as small an area as you want. Probably most folks will use it for Country > State > City -- but there's nothing keeping you from entering US > Northwest > Oregon > Portland > South East -- or even more specific if you really wanted to, though it'd probably become pretty cumbersome. Once those regions are in the database however, you get to display the whole region path with the xhtml syntax like this:

<cfoutput><tap:region regionid="#myregion#" codes="true" /></cfoutput>

And that would create something like this:


So on the page it looks like

US / Oregon / Portland

But this whole nested set model thing is always kind of a pain in the ass, and the method was more overhead than was really needed. Plus unless it's a menu and the individual region names are linked (which is another option in that tag), it doesn't really need the individual spans in the middle, so I was able to get some better performance out of it by changing the display code as well as retuning the RegionManager object so that it stores 2 queries internally with all the data from both of the tables that store the region information - one for the region and another for the nested set info. So now it uses query of query to get the ancestors or descendants for a particular region. Also eliminated the caching for individual region record structures since it's caching those queries now.

Incidentally, screw Joe Celko -- I learned how to do nested set on my own, before I'd ever heard of Celko. Never read his book either. Just another in a long list of things I've learned on my own only to later discover that even though people looked at me funny when I explained them, they happened to be powerful design patterns written up by someone else, which usually become popular some time after I learned them. :)

I also realized that when I'd implemented the auto-increment code recently apparently I got the sample code from somewhere else and hadn't thought to check the documentation. So I didn't realize that the column name for it wasn't consistent across platforms, so I had to update the framework core to use the different names for different databases. Would have been nice if Adobe had provided an extra key like a cf_autoincrement or somesuch maybe in addition to if not in place of the individual values for different databases. Which is essentially what I did in my code, so I guess at least if I get to use my own development techniques then the issue is moot.

Anyway, this means two new builds today. One new build of the framework core and one new build of the Members onTap plugin.

Members onTap Requirements

So I just noticed that since I uploaded some screen captures of the Members onTap plugin, there's been a spike in interest. It's views in the last couple days skyrocketed up to nearly 700 views (more than twice as many as the framework core project) and it's had 16 downloads...

There's just one problem...

There've only been 11 downloads of the Plugin Manager...

Which is listed in the requirements for the Members onTap plugin. It also makes me wonder if, even though there are twice as many downloads for the framework core, that some of the downloads for the Members onTap plugin might not have accompanied a download of the core. Anyway... whoever's getting it by itself is going to be awful confused if they don't read the installation instructions and figure out that they need the supporting architecture.

Edit (Dec. 27): Downloads for the plugin manager seem to be catching up with downloads for the member plugin, so I guess folks are realizing from the readme.txt that they need it. I'm still surprised honestly that adding screen-shots made the number of views for the member plugin ramp up like that. Views are up over 1k now.

BlogCFC was created by Raymond Camden. This blog is running version 5.5.006. | Protected by Akismet | Blog with WordPress