yeah i noticed that as well... confused!!

On 26/01/06, Gareth Cole <[EMAIL PROTECTED]> wrote:
> Hi Joe,
>
> I notice you recommend Doug Hughes' Reactor instead of your own ARF. Does
> this mean you've shelved ARF in favour or Reactor?
>
> I'd be interested to hear what people are using for code generators as there
> seems to be a few projects out there just now. I plan to start using a code
> generator for my next project. Obviously I've limited time to invest, so
> learning all of them and then making a decision isn't possible. What do
> people recommend?
>
> Thanks,
>
> Gareth
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
> > Of Joe Rinehart
> > Sent: 26 January 2006 14:55
> > To: CFCDev@cfczone.org
> > Subject: Re: [CFCDev] SQL Scenario
> >
> > Hi Phil,
> >
> > This is a pretty common scenario, and there's a few ways to solve it.
> > For something like the SELECT * FROM Orders where you really want
> > either a customer's orders or a vendor's orders, depending on who is
> > asking, I'd probably have one of two implementations.
> >
> > Gateway approach:
> >
> > I'd have an OrderGateway CFC that had methods like the following:
> >
> > <!--- shortened to get gist across. --->
> > <cffunction name="readCustomerOrders">
> >   <cfargument name="customerId" />
> >   <cfset var result = "" />
> >   <cfquery datasource="#getDatasource().getDSN()#" name="result">
> >     SELECT * FROM Orders WHERE CustomerID = <cfqueryparam
> > value="#arguments.customerID#" />
> >   </cfquery>
> >   <cfreturn result />
> > </cffunction>
> >
> > <cffunction name="readVendorOrders">
> >   <cfargument name="vendorId" />
> >   <cfset var result = "" />
> >   <cfquery datasource="#getDatasource().getDSN()#" name="result">
> >     ... WHERE VendorId = <cfqueryparam value="#arguments.vendorId#" />
> >   </cfquery>
> >   <cfreturn result />
> > </cffunction>
> >
> >
> > ...that's probably the simplist approach, as it gives you a CFC that's
> > very cohesive, simple to write and simple to use.
> >
> > Another way is to go the more ORM route, where you could have Vendor
> > and Customer CFCs with methods like Vendor.getOrders() and
> > Customer.getOrders(), where getOrders knows to perform the proper type
> > of query.  Frameworks like Doug Hughes' Reactor can make this easy,
> > because they take care of the ORM, lazy loading, and "do I want a
> > query of orders or an array of Order CFCs?" problems.
> >
> > Does that help?
> >
> > -Joe
> >
> >
> > --
> > Get Glued!
> > The Model-Glue ColdFusion Framework
> > http://www.model-glue.com
> >
> >
> > ----------------------------------------------------------
> > You are subscribed to cfcdev. To unsubscribe, send an email to
> > cfcdev@cfczone.org with the words 'unsubscribe cfcdev' as the subject of
> > the email.
> >
> > CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
> > (www.cfxhosting.com).
> >
> > An archive of the CFCDev list is available at www.mail-
> > archive.com/cfcdev@cfczone.org
> >
>
>
>
>
>
>
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email to 
> cfcdev@cfczone.org with the words 'unsubscribe cfcdev' as the subject of the 
> email.
>
> CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
> (www.cfxhosting.com).
>
> An archive of the CFCDev list is available at 
> www.mail-archive.com/cfcdev@cfczone.org
>
>
>


--
Nick Tong
Managing Director

TalkWebSolutions Limited
:: We Mind your Business ::
http://www.talkwebsolutions.co.uk


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
cfcdev@cfczone.org with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at 
www.mail-archive.com/cfcdev@cfczone.org


Reply via email to