You don’t know what you have till it’s gone…

I love ColdFusion, but I never realized how much until I started using something else. When developing the templates for this Blog in MovableType I quickly found myself wanting to add ColdFusion tags for customization. Unfortunately it’s not that simple and MovableType is far more limited.

I first read about integrating ColdFusion with MovableType from Mike Chambers in his blog entry
MovableType and ColdFusion MX
. This sounded like the best of both worlds–an established robust Blogging system and an extensive development platform.

That turned out not to be the case. While you can easily use MovableType to generate ColdFusion files as Mike explained in his blog, the key part is the MT is generating CFML. The two systems will process each page in sequence–first MT generates CFML at compile time and then CF executes it at run-time. This separation means the two can’t be seemlessly integrated, much like what we’ve dealt with for years in having CF and JavaScript communicate. Yes, you can do it, and no, it’s not difficult, but it’s also not seemless.

Key areas of MovableType where I found this limiting are in highly dynamic areas. For example, MovableType has a MTInclude tag which is similar to CFInclude. However, it has nothing that corresponds to a CFModule, meaning you can’t pass parameters to the target template, which would have been very nice for the calendar and breadcrumbs.

While MT does have MTSetVar and MTGetVar for working with variables, you can’t nest MT tags so they can really only be used for storing and later outputting static data. For example, I wasn’t able to store the current month of the latest entry and then pass it to a module for calculation of a relevant calendar.

MovableType is great blogging software, but I’m just too accustomed to being able to do real programming in my pages. Perhaps I’ll change it to dump the MT data into CF variables or XML files and just use CF for display and formatting.

5 thoughts on “You don’t know what you have till it’s gone…

  1. If you use MT with MySQL, you could always use MT for the input actions (insert/update) and CF for output (display/reporting).

  2. Yes, that is true, but you would lose much of the advantage of MovableType. Instead of being able to just to an MTEntries to get recent entries or build a calendar in a few lines of MTCalendar code, you’d have to write all the queries and do all the display logic. Certainly doable, but you lose a lot in the process.

    One option I’ve thought of is to just use MT to output XML inside of a cfxml tag and then use CF or even XSLT to generate the content from XML.

  3. Pingback: texas holdem

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>