Re: Which code reuse method?

2010-05-13 Thread Shannon Rhodes
snipCustom tag is just that: a bit of code that can be called in a single tag, that's all. Nothing 'overkill' about it to implement for a simple computation. cf_getMyLink relativePath=/path/to/mytemplate.cfm environment=development / seems fairly straightforward./snip I somewhat disagree.

Re: Which code reuse method?

2010-05-13 Thread Casey Dougall
On Thu, May 13, 2010 at 10:54 AM, Shannon Rhodes shan...@rhodesedge.comwrote: snipCustom tag is just that: a bit of code that can be called in a single tag, that's all. Nothing 'overkill' about it to implement for a simple computation. cf_getMyLink relativePath=/path/to/mytemplate.cfm

RE: Which code reuse method?

2010-05-13 Thread DURETTE, STEVEN J (ATTASIAIT)
[mailto:shan...@rhodesedge.com] Sent: Thursday, May 13, 2010 10:54 AM To: cf-talk Subject: Re: Which code reuse method? snip I somewhat disagree. The easiest way to deal with a straightforward code snippet that takes no input parameters is a simple cfinclude. I can copy/paste the code directly from

RE: Which code reuse method?

2010-05-13 Thread DURETTE, STEVEN J (ATTASIAIT)
snip I think components still make the most reusable choice for things like this. I throw all my utility type functions into one cfc and call the correct function according to what is required, even if no input is required it still has the desired affect of doing xyz. These don't change often so

Which code reuse method?

2010-05-11 Thread Shannon Rhodes
I'm probably overthinking this, but I have a really simple snippet of code that I want to make easily available to other developers in-house. It takes no input variables; all it does is figure out the correct link to reporting services based on the server environment (dev/QA/prod). Given the

Re: Which code reuse method?

2010-05-11 Thread Gerald Guido
However, my secondary concern is that we do not have a process for sharing code in-house so I could see whatever method I choose turning into a sort of default method of code reuse (even when not appropriate). If that is the case, I would recommend making it a custom tag and sticking it in the

Re: Which code reuse method?

2010-05-11 Thread Cutter (ColdFusion)
We set a variable in our onApplicationStart() method that looks at the server and defines an Application level variable for the server environment (which we'll move to the Server scope once we transition to CF9). Steve Cutter Blades Adobe Community Professional - ColdFusion Adobe Certified

Re: Which code reuse method?

2010-05-11 Thread Jason Fisher
. cf_getMyLink relativePath=/path/to/mytemplate.cfm environment=development / seems fairly straightforward. From: Gerald Guido gerald.gu...@gmail.com Sent: Tuesday, May 11, 2010 11:18 AM To: cf-talk cf-talk@houseoffusion.com Subject: Re: Which code reuse method

RE: Which code reuse method?

2010-05-11 Thread DURETTE, STEVEN J (ATTASIAIT)
...@wanax.com] Sent: Tuesday, May 11, 2010 12:32 PM To: cf-talk Subject: Re: Which code reuse method? +1 to making it a custom tag in the server's default custom tag directory. Definitely a custom tag or a cfc seem like overkill. Custom tag is just that: a bit of code that can be called

Re: Which code reuse method?

2010-05-11 Thread Shannon Rhodes
Great tips, thanks all! ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive:

RE: Which code reuse method?

2010-05-11 Thread LRS Scout
over the place. A cfc does seem to be going overboard to me. I like the UDF Idea personally. -Original Message- From: Shannon Rhodes [mailto:shan...@rhodesedge.com] Sent: Tuesday, May 11, 2010 10:56 AM To: cf-talk Subject: Which code reuse method? I'm probably overthinking this, but I