DP Root Package

The Root Package contains the foundational and utility CFCs required by other DP Packages. The Root package is required for all other DP Packages and applications.

The most important part of the package is the root CFC (DP_Component.CFC). This CFC is ultimately extended by all components in the DP Libraries. Much of it is dedicated to making CFC development more consistent and providing certain abstracted features to all CFCs. Some of these are:

  • Formal Instance Variable Declaration: All DP CFCs can formally declare the name, type and a description for all of the instance variables (properties or "Props" for short) that they wish to allow public access to.
  • Formalized (and easy to use) MetaData: Instance variable declarations, component names and extension information are cached and stored as "DPMetaData". You can then retrieve the metadata for the component, its ancestors or just for specific properties.
  • Generic getter and setter: Formally defining your instance variables gives you access to the generic getter and setter, getProp() and setProp(). These methods first attempt to utilize property specific getter and setter functions if they exist or are added later. Type validation equivelant to the CFARGUMENT tag on any defined Prop is also standard (and exposed for general use).
  • Init() Management: All DP Components have an init() method and they all have the function isDPInit() to determine if the init() method has been run.
  • All Instances Uniquely Identified: All DP CFCs have a unique identifier that can be used as a variable name. You can use this to create struct key names, Lock names, unique database record keys and so forth.
  • Instance Lifespan Management: All DP CFCs track the time they were created and, optionally, the time of last access via a provided touch() method.
  • Consistent Exception Handling: The root component provides a simplified (and scriptable) interface to CFTHROW.

The root package contains an empty template DP Libraries CFC which should make it easier to create your own DP Libraries extensions and applications.

17 Current Sessions; Time: 19:17:54 19-11-2008; Tick: 531