Difference between revisions of "ADF Core"

From ADF Docs
Jump to: navigation, search
(Components)
Line 4: Line 4:
 
== Components ==
 
== Components ==
 
* Core.cfc - Initialization component for the ADF.  This code creates the factory object into server space.  The configuration of the object factory is controlled through the [[Core Bean Config|Core Bean Config]].   
 
* Core.cfc - Initialization component for the ADF.  This code creates the factory object into server space.  The configuration of the object factory is controlled through the [[Core Bean Config|Core Bean Config]].   
  <cfscript>
+
<code>
    server.ADF = StructNew();
+
<cfscript>
    server.ADF.dependencyStruct = StructNew();
+
// Check if the ADF variable does not exist in server scope
    // Build object factory  
+
if ( NOT StructKeyExists(server, "ADF") )
    server.ADF.beanConfig = createObject("component","ADF.core.lightwire.BeanConfig").init();
+
server.ADF = StructNew();
    server.ADF.objectFactory = StructNew();
+
    server.ADF.objectFactory = createObject("component","ADF.thirdParty.lightwire.LightWire").init(server.ADF.beanConfig);
+
server.ADF.beanConfig = StructNew();  // Stores the server bean configuration
    // Build the environment variables
+
server.ADF.objectFactory = StructNew(); // Stores the server object factory
    configEnvironment();
+
server.ADF.dependencyStruct = StructNew(); // Stores the bean dependency list
  </cfscript>
+
server.ADF.library = StructNew(); // Stores library components
 +
server.ADF.proxyWhiteList = StructNew(); // Stores Ajax Proxy White List
 +
server.ADF.dir = expandPath('/ADF');
 +
 +
// Build object factory  
 +
server.ADF.beanConfig = createObject("component","ADF.core.lightwire.BeanConfig").init();
 +
server.ADF.objectFactory = createObject("component","ADF.thirdParty.lightwire.LightWire").init(server.ADF.beanConfig);
 +
 +
// Load the Ajax white list proxy
 +
server.ADF.proxyWhiteList = createObject("component","ADF.core.Config").getConfigViaXML(expandPath("/ADF/lib/ajax/proxyWhiteList.xml"));
 +
</cfscript>
 +
</code>
 +
 
 
* Base.cfc - Root base component for the ADF.  Extended by the AppBase component (AppBase.cfc) to perform get operations for a factory object.
 
* Base.cfc - Root base component for the ADF.  Extended by the AppBase component (AppBase.cfc) to perform get operations for a factory object.
 
* AppBase.cfc - Application base component.  Extends the Base component and is extended by the custom application App components.  Provides a layer between the ADF and the custom application.
 
* AppBase.cfc - Application base component.  Extends the Base component and is extended by the custom application App components.  Provides a layer between the ADF and the custom application.

Revision as of 13:41, 24 March 2010

Overview

Directory for the core components that implement the lightwire object factory.

Components

  • Core.cfc - Initialization component for the ADF. This code creates the factory object into server space. The configuration of the object factory is controlled through the Core Bean Config.

<cfscript> // Check if the ADF variable does not exist in server scope if ( NOT StructKeyExists(server, "ADF") ) server.ADF = StructNew();

server.ADF.beanConfig = StructNew(); // Stores the server bean configuration server.ADF.objectFactory = StructNew(); // Stores the server object factory server.ADF.dependencyStruct = StructNew(); // Stores the bean dependency list server.ADF.library = StructNew(); // Stores library components server.ADF.proxyWhiteList = StructNew(); // Stores Ajax Proxy White List server.ADF.dir = expandPath('/ADF');

// Build object factory server.ADF.beanConfig = createObject("component","ADF.core.lightwire.BeanConfig").init(); server.ADF.objectFactory = createObject("component","ADF.thirdParty.lightwire.LightWire").init(server.ADF.beanConfig);

// Load the Ajax white list proxy server.ADF.proxyWhiteList = createObject("component","ADF.core.Config").getConfigViaXML(expandPath("/ADF/lib/ajax/proxyWhiteList.xml")); </cfscript>

  • Base.cfc - Root base component for the ADF. Extended by the AppBase component (AppBase.cfc) to perform get operations for a factory object.
  • AppBase.cfc - Application base component. Extends the Base component and is extended by the custom application App components. Provides a layer between the ADF and the custom application.

Lightwire

Factory Object Configuration

The ADF core initialization is controlled through the Core. This component loads the object factory into server space.

The ADF factory objects are configured through the Core Bean Config.