Defining the address service
Let's repeat the process for the second of our packages used within the application, the user package.
Create a new file called AddressService.cfc
within the com/packtApp/oop/dataAccess
directory within your application, and add the following code to the file:
<cfcomponent displayname="AddressSVC" output="false" hint="I am the AddressSVC Class used to interact with the Address package."> <!--- Pseudo-constructor ---> <cfset variables.instance = { addressDAO = '', addressGW = '' } /> <cffunction name="init" access="public" output="false" returntype="any" hint="I am the constructor method for the AddressSVC Class."> <cfargument name="datasource" required="true" type="com.packtApp.oop.beans.Datasource" hint="I am the datasource object." /> <!--- Set the initial values of the Bean ---> <cfscript> // instantiate the Data Access Object variables.instance.addressDAO = createObject( 'component', 'AddressDAO').init(arguments.datasource...