Re: CFC's.. Why use them?

2009-09-08 Thread Casey Dougall
On Tue, Sep 8, 2009 at 4:39 PM, Scott Stewart wrote: > > Phillip, > > One of the things that CFC's can do is encapsulate repetitive code, you can > write a function one time and call it multiple times. > > I personally like knowing what I actually send to a cfc. With an include and the variables

Re: CFC's.. Why use them?

2009-09-08 Thread Gerald Guido
I think that one of the best uses of CFC's (and UDFs and custom tags) is to abstract or "hide" a lot of code behind simple function calls or custom tags so you can make changes in one place and have of in effect globally. Or if you abstract part of your code, like the database layer, you can make

Re: CFC's.. Why use them?

2009-09-08 Thread s. isaac dealey
> Remember that Singleton is a DESIGN pattern. The complexities we see > in much of the published literature are based on Java's inability to > cleanly implement a secure Singleton design because it doesn't have a > global scope and any real sense of "application startup". Don't mix > design and i

Re: CFC's.. Why use them?

2009-09-08 Thread Sean Corfield
On Tue, Sep 8, 2009 at 1:38 PM, Peter Boughton wrote: > Though this one is not just the CF community - plenty of people all round > don't really know what Singletons (and even design patterns in general) > actually are. Remember that Singleton is a DESIGN pattern. The complexities we see in muc

Re: CFC's.. Why use them?

2009-09-08 Thread Peter Boughton
Hi Nathan, Yes, this bit: >Or, are you just saying we throw the word around like candy at a parade and >should stop before we hit someone in the eye? Though this one is not just the CF community - plenty of people all round don't really know what Singletons (and even design patterns in general)

RE: CFC's.. Why use them?

2009-09-08 Thread Scott Stewart
From: Phillip Vector [mailto:vec...@mostdeadlygame.com] Sent: Tuesday, September 08, 2009 2:35 PM To: cf-talk Subject: Re: CFC's.. Why use them? Thanks for the replies guys. I have currently the task of converting over a straight forward web app to fusebox. The app already has allot of repeat

Re: CFC's.. Why use them?

2009-09-08 Thread Phillip Vector
Thanks for the replies guys. I have currently the task of converting over a straight forward web app to fusebox. The app already has allot of repeat code and this isn't something that is going to be easy at all. One thing I have going on is that I have LOTS of cfcs. I mean, LOTS of them (over 100

Re: CFC's.. Why use them?

2009-09-08 Thread Nathan Strutz
Peter, I understand the singleton pattern. It's lovely, on a cloudy day or sipping some tea or whatever, but in CF, don't you think that implementing the true singleton pattern is overkill and generally unnecessary? Consider our lack of true constructors, the stateless nature of the web, and mult

Re: CFC's.. Why use them?

2009-09-08 Thread Nathan Strutz
Brad, I love the microwave analogy. Phillip, CFCs as a fancy include tends to be the first step on your way to really understanding components and objects. I've been with a few groups who have gone (and taken me) through the course. The evolution is like this: --- CFC as

Re: CFC's.. Why use them?

2009-09-08 Thread Peter Boughton
>Just a quick thought: If, for example, you are building reusable, >singleton components (sorry for the OO buzzwords, but it is descriptive >terminology), then you can load those CFCs into Application scope and have >them exist in memory only once but still be used across all requests in the

RE: CFC's.. Why use them?

2009-09-08 Thread Jason Fisher
"like starting your microwave on fire to cook your supper over it" That is a wonderfully expressive metaphor (and accurate to the example, too!) ~| Want to reach the ColdFusion community with something they want? Let them kn

RE: CFC's.. Why use them?

2009-09-08 Thread brad
I'd sure hate to write a SOAP webservice in a .cfm file. Also, cfm files don't give you objects that can be passed around, provide encapsulation of data, and support code re-use via inheritance and method overriding. I mean, you can do anything you want in cfm files, but there are some things

Re: CFC's.. Why use them?

2009-09-08 Thread Phillip Vector
Gotcha. Thanks. :) On Tue, Sep 8, 2009 at 7:49 AM, Jason Fisher wrote: > > Just a quick thought:  If, for example, you are building reusable, > singleton components (sorry for the OO buzzwords, but it is descriptive > terminology), then you can load those CFCs into Application scope and have > th

re: CFC's.. Why use them?

2009-09-08 Thread Jason Fisher
Just a quick thought: If, for example, you are building reusable, singleton components (sorry for the OO buzzwords, but it is descriptive terminology), then you can load those CFCs into Application scope and have them exist in memory only once but still be used across all requests in the app.