March 24, 2008
I've been working up a few demos lately that make use of the new layout tags in ColdFusion 8, and while I think they really do make Ajax based layouts much easier than using the Ext js and YUI libraries on their own, there are a couple of issues I've bumped into that have me thinking that their potential may be limited. Let me explain.
Today I was working on a dashboard mock-up to show to some of my colleagues. I wanted to show them how simple it is to do a dashboard in ColdFusion, and I wanted to do it using the new cfwindow, cflayout, and cflayoutarea tags. Things were moving along well until I wanted to add an accordion pane on the left-hand side of the layout. Try as I might, I couldn't find the attribute or value in any of the new tags to make it happen. That's when I realized that accordion panes are only available as part of the Flash based cfform controls. Doh! I don't want to use any Flash in my dashboard demo (I'll leave that to a Flex based demo), just straight HTML/Ajax. There are several options for adding an accordion panel outside of ColdFusion (Spry, Ext js, etc.), but I wasn't expecting that the control wasn't going to be included as part of ColdFusion 8.
This led me to more carefully consider the new UI controls in ColdFusion 8. For many layout tasks, they may be sufficient. However, what really has me concerned is situations like this. I still want an accordion control, and in order to get it, I'll have to mix and match the ColdFusion UI controls with another solution. What I'm strongly considering right now is abandoning the new UI controls all together in favor of a custom tag based approach. It turns out that there are two ColdFusion custom tag libraries that each wrap the Ext js library: cfExt by Dan Vega and ColdExt by Justin Carter. I like the custom tag based approach for a number of reasons:
- Utilizes the latest EXTjs library: 2.x. ColdFusion 8 currently uses EXT 1.x, and it doesn't look like they will be upgrading to 2.x anytime soon.
- Custom tags allow for new feature adds faster than new ColdFusion releases.
- Custom tags allow for community contribution.
- Custom tags give you total freedom to customize should you need features not implemented by the original author.
- Custom tags provide a form of insurance against Adobe stopping future development of the new UI tags. While they have always done a good job of maintaining backward compatibility, there are numerous examples of situations where a particular technology was phased out and new features/functionality halted (cfgraph/cfchart, Flash forms, cfform java applets to name a few)
I'd love to hear what others have to say about this topic.