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.
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
[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
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
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
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
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
. 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
...@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
Great tips, thanks all!
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive:
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
11 matches
Mail list logo