O'Reilly logo

Object-Oriented Programming in ColdFusion by Matt Gifford

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required