Building DP CFCs: Introduction

All DP Applications use, you guessed it, DP CFCs. A DP CFC is simply a normal ColdFusion Component that has extended the DP Root Component and defined itself in a stadardized way. It is actually quite simple to convert any existing component to a DP CFC and the work involved in creating a DP CFC versus a "normal" CFC is insignificant.

If you haven't yet it's highly recommended that you first read the DP Libraries Overview. It covers the basics of the framework and some of the more important mechanisms in it.

DP CFCs follow the popular convention of requiring an initilization function called "init()". This means that a CFC can be instantiated (created) but not initialized (populated with data). The DP Libraries maintains information within each CFC allowing the programmer to determine if the CFC's init() function has been called or not.

Building a DP CFC is actually quite simple. The basic steps are:

  • Extend the Root Component
  • Define Properties
  • Cache DPMetaData
  • Call Super.Init()

There's a sample template for you to examine ("cfc_DepressedPress.DP_CFCTemplate.cfc") in the Root package that demonstrates these steps and can be used as a development template.

13 Current Sessions; Time: 03:32:16 06-01-2009; Tick: 547