Don't forget about ColdFusion Custom Tags

Since ColdFusion introduced Components (CFCs) I've seen a lot less mention of custom tags. But it seems to me like there are still good uses for custom tags. One place that comes to mind is your application's look & feel.

For instance a recent project required that I build a security challenge question micro-app for two web applications that utilize the same back-end. Think of it like a "Pro" and "Light" version of the same application. The originators of the web app built two different CF applications to talk to the same database. So with challenge question portion I built a custom tag to wrap all the content, then all of the forms were just simple, plain Jane HTML. Then based on our URL we initiated passed in the look & feel ID to the wrapper. BAM! We have two distinct product views, from one source code.

Moreover this turned into a proof of concept for a larger project the client had on their books. They were planning to integrate the two code-bases into a single code base. However, they originally thought they would have to give up the look and feel of one of the two applications. We have started migrating this concept to the pro-version of the application and will soon begin testing of providing the "light" view on the PRO app.

So if you haven't used custom tags in a while, just keep an open mind that there may be some instances where these could be valuable to you.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
BlogCFC was created by Raymond Camden. This blog is running version 5.8.001.