Gavin,

Wait a minute, I wanted to confirm what you were defining as duplicate,
personally I dont consider lines 1 - 7 duplicate because they are defining
the method itself and what you need to pass, yes by definition you can make
the assumption that because the method and arguments are the same they
could be considered duplicate.

But I wanted to ask because I also consider the code in the middle as part
of the method as well.

Don't get me wrong I can see what your saying, and yes I do disagree with
it being duplicate in that case. I didn't want to tread on your toes, I
just wanted to get a clearer picture on what you are talking about.

Hell one could argue that every time I write, or copy the following line.

<cfquery name="result" datasource="datasource">

Is duplicate because I copied and pasted it, by your definition. Sorry
Gavin you fell into that one.

But I still stand by the abstraction, service and gateway abstraction. The
DAO is always a personal choice on whether you want to also go that route
as well, I think if I read you right you have gone that route, and you
maybe right in that you don't see a need in your current situation on
whether you need the DAO route.

Now without going into further arguments, you argument can also be applied
to all OO principles as well, because if we extend an abstract component or
even a normal component your lines 1 to 7 will have to be duplicated to
keep the confusion to a minimum, and allow for the method to be overridden,
and have the same arguments.

So if you follow that rule of OO principle, would you take the same stance
as it being duplicated if you want to change the behaviour of the abstract
method?

Which I guess I failed to convey across to you.

I think if you watch the video by Bob Silverberg, it may make more sense to
you. As he does also go into more refactoring off the code to keep all code
to a minimum, while still allowing for OO principles to apply. A lot of the
stuff can be moved to an abstract layer as he has indicated to reduce what
you described, but you still risk the chance that you may need to override
the abstract layer, so that the meat and bones of the method has different
logic.
And those lines 1 - 7 that you have listed as being duplicate are indeed a
thing that we can't ignore from time to time, it just part of the design of
our application.

I think Bob explains this very well in the video, and does highlight what I
was trying to convey.


-- 
Regards,
Andrew Scott
WebSite: http://www.andyscott.id.au/
Google+: http://plus.google.com/108193156965451149543



On Thu, Jan 12, 2012 at 2:28 PM, Gavin Baumanis <beauecli...@gmail.com>wrote:

> With the greatest of reservations about feeding the trolls....************
>
> ** ******
>
> What alternate universe do you live in, Andrew?********
>
> ** ******
>
> I clearly stated********
>
> The intent of the two CFCs is different.********
>
> and********
>
> that for "MY" work - the ServiceCFC was all but, always an empty stub for
> the method in the DAO CFC.********
>
> ** ******
>
> Given;********
>
> ** ******
>
> SericeCFC********
>
> 1 <cffunction name="getStuff>********
>
> 2 <cfargument name="name1">********
>
> 3 <cfargument name="name2">********
>
> 4 <cfargument name="name3">********
>
> 5 <cfargument name="name4">********
>
> 6 <cfargument name="name5">********
>
> 7********
>
> 8 <cfreturn DAO_CFC.getStuff(name1, name2, name3, name4, name5 >********
>
> 9 </cffunction>********
>
> ** ******
>
> ** ******
>
> DAO_CFC********
>
> 1 <cffunction name="getStuff>********
>
> 2 <cfargument name="name1">********
>
> 3 <cfargument name="name2">********
>
> 4 <cfargument name="name3">********
>
> 5 <cfargument name="name4">********
>
> 6 <cfargument name="name5">********
>
> 7********
>
> 8 <cfquery name="myQuery">********
>
> 9 SELECT * from #arguments,name1 where column1 = #arguments.name2" and
> column2 = #arguments.nam3# and column3=#arguments.name4# and column22 in
> (#arguments.name5#)********
>
> 10 </cfquery>********
>
> 11********
>
> 12 <cfreturn myQuery >********
>
> 13 </cffunction>********
>
> ** ******
>
> Under what circumstances, on planet earth, is lines 1 through 7, in either
> CFC not a duplicate of the other?********
>
> Whereby "duplicate" means;********
>
> (according to *thefreedictionary.com* <http://thefreedictionary.com/>)****
> ****
>
> *1. *Identically copied from an original.********
>
> ** ******
>
> I even stated in my post that I created the DAO CFC by copy / pasting the
> code from the Service CFC. ********
>
> And included the caveat of;********
>
> So apart from the "guts" of the DAO method ********
>
> And also provided the proof - that the application "diff" agreed with me.*
> *******
>
> ** ******
>
> But alas,********
>
> I forgot you know absolutely everything about everything and that you are
> never, ever, wrong.********
>
> Obviously,  I am wrong. As must be every file “diffing” tool in existence.
> ********
>
> ** ******
>
> Please accept my apology for not completely / wholly agreeing with you,
> instantly.********
>
> I am not sure what came over me, ********
>
> I will never, ever doubt you or your stunning and dazzling ColdFusion
> brilliance, again.********
>
> ** ******
>
> In Andrew Scott We Trust - because he says so.
> ****
>
> --
> You received this message because you are subscribed to the Google Groups
> "cfaussie" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/cfaussie/-/7z5ENOHbIvMJ.
>
> To post to this group, send email to cfaussie@googlegroups.com.
> To unsubscribe from this group, send email to
> cfaussie+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/cfaussie?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.

Reply via email to