On Mon, Mar 31, 2008 at 2:04 PM, Alan Livie
<[EMAIL PROTECTED]> wrote:
>
>  @Patrick, I agree to a certain extent with what you're saying but you said...
>
>
>  ' Simple queries are easy to change, even if I
>  have to make the same change to five or six different queries.'
>
> One of the problems I had a while back was implementing a business rule in
> a query in a cfc only to find a few weeks later it wasn't implemented 
> everwhere
> as some pages had their own <cfquery> in the page querying the same data
> rather than using the cfc to get the results.
>
Well I was exaggerating a bit. :)

Rather than repeating the same query on several different pages, it's
probably better to wrap the query in a function and call that
function. And maybe even put the function next to some related
functions inside a CFC. But that's just refactoring. That's something
that can be done easily without pulling in a full blown domain model
or O/R mapping framework.

(Of course, there are times when hooking into that big honkin'
framework would be appropriate too...)

Patrick

-- 
Patrick McElhaney
704.560.9117

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