« And Now For Something Completely Different: Macromedia Central | Main | Validation - Client or Server-side? »
September 29, 2003
Simplifying Component Inheritance
When you want one component to extend another, if the parent component is in the same package (directory) as the child component, you don't have to specify a fully-qualified name. For instance, if both components were in the directory "/myApp/components/handlers" rather than doing this...
<cfcomponent name="myComponent" extends="myApp.components.somePackage.Parent">
...you can do this...
<cfcomponent name="myComponent" extends="Parent">
This is particularly useful when you want your component path to be dynamic or configurable since if you hard-code the entire path, and you want to move your components or your entire application to a different directly, all your component inheritance would be broken.
Posted by cantrell at September 29, 2003 1:17 PM
Comments
This also applies to calls to other cfcs in the same package as well, ie you can use cfinvoke name="foo" instead of name="fullqualified etc"
Posted by: Raymond Camden at September 29, 2003 3:58 PM
Raymond, I think you're mistaken
Posted by: Buy.com at December 10, 2003 6:59 PM