Sean,

That is a really interesting post!

A couple of questions on some of the finer points:


> Fifth, I'm starting to use a BaseGateway CFC that uses
> onMissingMethod() to implement a number of common persistence methods
> such as get{Object}ById(id) and findAll{Object}s() and so on. Specific
> gateways extend this. In ColdSpring, I define the BaseGateway as an
> abstract bean and specify the constructor-arg values for transfer and
> datasource beans (which ColdSpring gets from transferFactory via the
> factory-bean / factory-method constructs). I define individual
> gateways to have baseGateway as a parent bean and specify a
> constructor-arg that specifies the package name for that gateway (all
> my Transfer objects live in packages so each gateway typically
> operates on only one package).


Just to clarify, your Gateway objects essentially act as your service layer
from the get go.  As you develop, you could end up implementing a
getVendorById(), in case you wanted to provide custom logic if it is
required.  Would that be correct?

I really like this idea however!  Its giving me some great ideas for
application development :oD Thanks!


>
>        <bean id="assetGateway" class="project.model.data.AssetGateway"
> parent="baseGateway">
>                <constructor-arg
> name="packageName"><value>asset</value></constructor-arg>
>        </bean>


Another quick one - is there any particular reason you  pass in the
packageName as a constructor arg rather than hard code it in the
AssetGateway (which I assume is calling a super.init())

-- or, now that I come to think of it, is the AssetGateway constructor
simply extending the one of the baseGateway, which requires the package that
you wish to use? (I'm going to assume this is the answer).

Mark



-- 
E: [EMAIL PROTECTED]
W: www.compoundtheory.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CFCDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfcdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to