FarCry: modBreeze Plugin Released

written by Geoff Bowers on Wednesday, 10 October, 2007 @ 05:52 PM

As part of the FarCry Inspire session for MAX, I put together a great little plugin to show-case just how easy it is to build things in the FarCry framework. Thought I might put together a few notes describing how it all goes together. The solution requires the CFPRESENTATION tag, so you will need ColdFusion 8 to make things work.

modbreeze: Breeze Presentation Plugin for FarCry
Provides content management for presentations, presenters and slides. Users can assemble their own slide decks into a presentation. Presentations are generated using the inbuilt flash presentation engine for ColdFusion.

The plugin is made up of three content types; presenter, presentation slide, and the presentation itself. Download the entire code base or just link to the individual files to get a feel for how simple the code is.

The presenter object (./packages/types/modPresenter.cfc) is used to capture data for the arguments we ultimately want to pass into the CFPRESENTER tag when we build the presentation.

Inspire: Presenter

Trying to showcase just how little code is required to build a complete edit handler for this object -- yup, complete with image upload and manipulation in just six cfproperty tags. The form is built on the fly from the metadata contained in the cfproperty attributes. A complete library of "formtool" metadata is available in the docs.

The presentation slide object (./packages/types/modPresentationSlide.cfc) is used to capture data for the arguments passed into the CFPRESENTATIONSLIDE tag when we build the presentation. We want this to be able to handle rich text, images and other media.

Inspire: Presentation Slide

Significantly, we want the slide object to have an associated presenter object, picked from a library of presenter content items. Make sure you have a look at the "presenter" property; all it needs is the ftJoin attribute and you have wired up this relationship.

The number of properties in the presentation slide makes it an ideal candidate for splitting up into a multi-step form or wizard. Simple. See those ftwizardstep attributes? That's all it takes to convert the dynamic form into a dynamic wizard.

Lastly, the presentation object (./packages/types/modPresentation.cfc) is used to capture data for the arguments passed into the CFPRESENTATION tag and to build the slide deck we want for our online presentation. We want to be able to select slides from our slide library, and order them anyway which way.

Inspire: Presentation

Again we're using the clever ftJoin attribute to create a many-to-many relationship and capture an array of slides for our presentation.

The real workhorse here is the view (./webskin/modPresentation/displayPageStandard.cfm) we're using to create the presentation and bring all of our work to a conclusion.

Related Blog Posts


Permalink: http://blog.daemon.com.au/go/blog-post/farcry-modbreeze-plugin-released