Re: includes and cfc's

2004-11-02 Thread JT News
Thanks for the resources! I spent a good deal of time yesterday looking at the docs and example apps at mach-ii.com I'll let you all know how it goes. -Josh -- Exciteworks, Inc Expert Hosting for less! *Ask for a free 30 day trial!* http://exciteworks.com Plans starting at -$12.95- including M

Re: includes and cfc's

2004-11-01 Thread Joe Rinehart
Egads, thanks Josh. I've corrected my sig :). I'd suggest taking a look at mach-ii at http://www.mach-ii.com/ for a very slick way of doing things in CF. -Joe On Sun, 31 Oct 2004 21:25:52 -0500, JT News <[EMAIL PROTECTED]> wrote: > Joe, > > This is pretty interesting, the init function and

Re: includes and cfc's

2004-11-01 Thread Greg Stewart
Josh, You can find a few best practices/gudieliens here: http://www.dintenfass.com/cfcbestpractices/. Nathan kindly put these together based on threads/discussions on the CFCzone mailing list (http://www.cfczone.org/). Cheers Greg On Sun, 31 Oct 2004 21:25:52 -0500, JT News <[EMAIL PROTECTED]>

Re: includes and cfc's

2004-10-31 Thread JT News
Joe, This is pretty interesting, the init function and different ways of calling CFCs...is there any further documentation on this anywhere? I love seeing new ways to do things. This matches better what I have used in other languages. oh and PS, I tried your link in the footer (http://clearsoft

Re: includes and cfc's

2004-10-31 Thread Mike Kear
I've lost the original link to what Raymond was talking about .. can someone please email it to me or post it here? Cheers Mike Kear Windsor, NSW, Australia AFP Webworks http://afpwebworks.com .com,.net,.org domains from AUD$20/Year

Re: includes and cfc's

2004-10-31 Thread Joe Rinehart
Hey Mike, I'm with Dave W. - it should probably be the argument to a method. One thing a number of us have been doing (some people like it, some people don't) is adding a method called "init" that takes initialization parameters for a CFC and then returning the cfc itself. It acts sort of like a

Re: includes and cfc's

2004-10-31 Thread Nathan Strutz
Where applicable (on createObject/cfobject instead of cfinvoke), I make an init() method that sets a local variable for a dsn. Init methods look like: function init(dsn) { variables.dsn=arguments.dsn; return this; } then to instantiate the cfc, it's like this: myCFC = createObject("compo

RE: includes and cfc's

2004-10-31 Thread Dave Watts
> Raymond says: > > [quote] > The method I use is to instantiate (in the application.cfm) a > "DP_PersistenceInfo" CFC - this CFC contains all of the > properties related to a specific datasource. This CFC is > added to a special "DP_Application" > CFC which is, itself, stored in the Applicat

Re: includes and cfc's

2004-10-31 Thread dave
on his galleon forums he uses a .ini file -- Original Message -- From: Mike Kear <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] Date: Mon, 1 Nov 2004 11:04:08 +1100 >Raymond says: > >[quote] >The method I use is to instantiate (in the application.cfm) a

Re: includes and cfc's

2004-10-31 Thread Mike Kear
Raymond says: [quote] The method I use is to instantiate (in the application.cfm) a "DP_PersistenceInfo" CFC - this CFC contains all of the properties related to a specific datasource. This CFC is added to a special "DP_Application" CFC which is, itself, stored in the Application scope. [/quote]

Re: includes and cfc's

2004-10-31 Thread dave
yeah thats why i asked it raymond has a pretty clever way but i dont really get it -- Original Message -- From: Mike Kear <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] Date: Mon, 1 Nov 2004 10:39:28 +1100 >Joe that seems a good point. One that had sli

RE: includes and cfc's

2004-10-31 Thread Dave Watts
> is there a shorthand way to pass the datasaource name to CFCs > or do you have to include the datasource name as one of the > arguments every time you instantiate a CFC? There are certainly shortcuts, but for the sake of clean encapsulation I would recommend that you simply pass it in as an ar

Re: includes and cfc's

2004-10-31 Thread Mike Kear
Joe that seems a good point. One that had slipped by me until now. is there a shorthand way to pass the datasaource name to CFCs or do you have to include the datasource name as one of the arguments every time you instantiate a CFC? Cheers Mike Kear Windsor, NSW, Australia AFP Webworks http:/

Re: includes and cfc's

2004-10-30 Thread Joe Rinehart
Mike, It can be referenced fine from within the CFC, but it's probably not a good idea. A CFC shouldn't "reach out" to external data, but instead be told what it needs to know. Doing otherwise breaks what's known as 'encapsulation' in the OOP world. Basically, it lowers the reusability of your

Re: includes and cfc's

2004-10-30 Thread Mike Alberts
Ok, I must be missing something here, but I specify my datasource in my Application.cfm file (in the request scope, framework was written in CF5 days) and I can reference it just fine in a cfc as #Request.Datasource#. Mike > well here is the reason why i ask > (raymond hasnt blogged about using

RE: includes and cfc's

2004-10-29 Thread dave
ne copy of the date to maintain. > > >Jim Davis > >-Original Message- >From: dave [mailto:[EMAIL PROTECTED] >Sent: Friday, October 29, 2004 2:35 AM >To: CF-Talk >Subject: RE: includes and cfc's > >well here is the reason why i ask >(raymond hasnt blo

RE: includes and cfc's

2004-10-28 Thread Jim Davis
ay you have only one argument to worry about and, since structures are passed by reference, only one copy of the date to maintain. Jim Davis -Original Message- From: dave [mailto:[EMAIL PROTECTED] Sent: Friday, October 29, 2004 2:35 AM To: CF-Talk Subject: RE: includes and cfc's well her

RE: includes and cfc's

2004-10-28 Thread dave
well here is the reason why i ask (raymond hasnt blogged about using the ini method yet) i was thinking that since u cant call some variables such as your datasourse names outta your Application.cfm file, that you could just include them, so u didnt have to (lazily) manually change them. know

RE: includes and cfc's

2004-10-28 Thread Jim Davis
-Original Message- From: dave [mailto:[EMAIL PROTECTED] Sent: Friday, October 29, 2004 1:38 AM To: CF-Talk Subject: includes and cfc's > can u include an include in a cfc? You can, but it's better to pretend you can't. There's a nasty little side effect of CFINCLUDE in CFCs: when you CF