Re: [cfaussie] Re: OO Application Architecture

2012-01-11 Thread Andrew Scott
Hehe.

So Gavin, what you are saying is that you can create a CFC have the method
named the same, same arguments and its duplicate code? Regardless that the
meat and guts of the logic is not the same?

Sorry that kinda doesn't sound like duplicate code to me :-)

And your example shows that. And the thing to remember is that the actual
DAO is returning a result, that by all intent and purposes is code reuse.

For example

cffunction name=getgavinsObject
cfargument name = ag1 required=true... 
cfargument name = ag2 required=true... 

cfreturn gavinsDAOCFC.getGavinsObject(arg1 = #arguments.arg1#, arg2 =
#arguments.arg2# 
/cffunction

Gets the data from the database tier, but getGavinsObjectJson might make
the same call to gavinsDAOCFC.getGavinsObject but instead convert the
object to JSON before returning it.

So technically there is no duplication of code, you have taken a call and
separated for reuse by other logic within your code.

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



On Wed, Jan 11, 2012 at 5:44 PM, Gavin Baumanis beauecli...@gmail.comwrote:

 Technically?

 In the very initial post is this;

 But for the most part, my Service layer becomes a duplicate of the
 Gateway.
 * Ensure we have the required arguments for the gateway,
 * Call the gateway functions, using the supplied arguments
 * Return exactly the gateway's return value(s) to the consumer.


 I suppose it is close to implementing an interface in terms of the code
 that is required to successfully run an application using a service layer.
 If -  you're using the service layer at it's simplest - proxying the DAO /
 gateway.
 And for the most part - that is 99.99% of what I have used a service layer
 for.

 So, since the function Name is the same,
 The arguments are named the same,
 The arguments are the same in number
 The arguments are the same in type...

 In fact I (previously) wrote the DAO by;
 Copy/pasting the the function from the serviceCFC
 Add the required SQL
 Alter as necessary the cfreturn code.

 So apart from the guts of the DAO method - the service CFC version was /
 is a duplication of code found in the DAO version.

 The intent  / the purpose of the two, is clearly different but it IS
 technically a duplication of code.
 diff myServiceCFC, myDaoCFC even agrees with me.


 Gavin




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



[cfaussie] OT : Amazon buckets

2012-01-11 Thread Steve Onnis
Does anyone know of any software that i can use to sync data with an S3
bucket?

 

Steve

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



Re: [cfaussie] OT : Amazon buckets

2012-01-11 Thread Mark Mandel
Automatically like dropbox, or on a scheduled basis, like rsync?

Mark

On Thu, Jan 12, 2012 at 1:17 PM, Steve Onnis st...@cfcentral.com.au wrote:

 Does anyone know of any software that i can use to sync data with an S3
 bucket?

 ** **

 Steve

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




-- 
E: mark.man...@gmail.com
T: http://www.twitter.com/neurotic
W: www.compoundtheory.com

2 Devs from Down Under Podcast
http://www.2ddu.com/

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



RE: [cfaussie] OT : Amazon buckets

2012-01-11 Thread Steve Onnis
More like a watcher/sync type of process

 

From: Mark Mandel [mailto:mark.man...@gmail.com] 
Sent: Thursday, 12 January 2012 1:20 PM
To: cfaussie@googlegroups.com
Subject: Re: [cfaussie] OT : Amazon buckets

 

Automatically like dropbox, or on a scheduled basis, like rsync?

 

Mark

On Thu, Jan 12, 2012 at 1:17 PM, Steve Onnis st...@cfcentral.com.au wrote:

Does anyone know of any software that i can use to sync data with an S3
bucket?

 

Steve

-- 
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
mailto:cfaussie%2bunsubscr...@googlegroups.com .
For more options, visit this group at
http://groups.google.com/group/cfaussie?hl=en.





 

-- 
E: mark.man...@gmail.com
T: http://www.twitter.com/neurotic
W: www.compoundtheory.com

2 Devs from Down Under Podcast

http://www.2ddu.com/

 

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

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



Re: [cfaussie] OT : Amazon buckets

2012-01-11 Thread Zac Spitzer
I have used http://s3tools.org/s3cmd before

On Thu, Jan 12, 2012 at 1:21 PM, Steve Onnis st...@cfcentral.com.au wrote:
 More like a watcher/sync type of process



 From: Mark Mandel [mailto:mark.man...@gmail.com]
 Sent: Thursday, 12 January 2012 1:20 PM
 To: cfaussie@googlegroups.com
 Subject: Re: [cfaussie] OT : Amazon buckets



 Automatically like dropbox, or on a scheduled basis, like rsync?



 Mark

 On Thu, Jan 12, 2012 at 1:17 PM, Steve Onnis st...@cfcentral.com.au wrote:

 Does anyone know of any software that i can use to sync data with an S3
 bucket?



 Steve

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





 --
 E: mark.man...@gmail.com
 T: http://www.twitter.com/neurotic
 W: www.compoundtheory.com

 2 Devs from Down Under Podcast

 http://www.2ddu.com/



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

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



-- 
Zac Spitzer
Solution Architect / Director
Ennoble Consultancy Australia
http://www.ennoble.com.au
http://zacster.blogspot.com
+61 405 847 168

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



Re: [cfaussie] Re: OO Application Architecture

2012-01-11 Thread Gavin Baumanis


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.



Re: [cfaussie] Re: OO Application Architecture

2012-01-11 Thread Andrew Scott
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.comwrote:

 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