Currently.. as a language that is one of ColdFusions weaknesses.


There are pretty much two ways to get functions out of ColdFusion..
The first is to encapsulate all the code in a Template and then
just CFINCLUDE the template.. the disadvantage is the page
does not have its own scope and can easily modify variables
that do not belong to it and kind of makes development more
tedious if you are not extremely careful.

The second method is Custom Tags.. Which in effect serve
as functions and get their own 'call space' all the variables
in a custom tag have their own scope etc, however doing
a call with a Custom Tag is a bigger penality hit than
a regular function in a regular procedural language
sucha s C/C++.. In fact its a big concern if performance
is an issue.

If you are really interested I recommend checking out the
Fusebox methodology as code reuse can be pretty high in a
big app written in Fusebox..

http://www.fusebox.com


Hope this helps..



Jeremy Allen
[EMAIL PROTECTED]
[Insert cool title here]

-----Original Message-----
From: Brandon Behrens [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 01, 2000 1:39 PM
To: Cf-Talk@Houseoffusion. Com
Subject: Functions in Cold Fusion


This is a multi-part message in MIME format.

------=_NextPart_000_0016_01BFFBA4.BF744660
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by bastion.theidf.com id
e71FbrJ27627

Hello everyone,

This may seem like a rookie question, but I cannot figure out a way to ma=
ke
my own function in Cold Fusion.  Am I missing something?  I have been
working with it for a month and haven=92t seen anything about it.  Can I =
make
calls to a Java class or something like that?

Thanks in advance,

Brandon Behrens

Brandon Behrens
The Internet Design Firm
512.451.5225
[EMAIL PROTECTED]
http://www.theidf.com


------=_NextPart_000_0016_01BFFBA4.BF744660
Content-Type: text/html;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<meta name=3DProgId content=3DWord.Document>
<meta name=3DGenerator content=3D"Microsoft Word 9">
<meta name=3DOriginator content=3D"Microsoft Word 9">
<link rel=3DFile-List href=3D"cid:[EMAIL PROTECTED]">
<!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:DoNotRelyOnCSS/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:View>Normal</w:View>
  <w:Zoom>0</w:Zoom>
  <w:DocumentKind>DocumentEmail</w:DocumentKind>
  <w:EnvelopeVis/>
 </w:WordDocument>
</xml><![endif]-->
<style>
<!--
 /* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0in;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
        {margin:0in;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
span.EmailStyle15
        {mso-style-type:personal-compose;
        mso-ansi-font-size:11.0pt;
        mso-ascii-font-family:"Times New Roman";
        mso-hansi-font-family:"Times New Roman";
        mso-bidi-font-family:Arial;
        color:black;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;
        mso-header-margin:.5in;
        mso-footer-margin:.5in;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style>
</head>

<body lang=3DEN-US style=3D'tab-interval:.5in'>

<div class=3DSection1>

<p class=3DMsoNormal><span class=3DEmailStyle15><font size=3D2 =
color=3Dblack
face=3D"Times New Roman"><span =
style=3D'font-size:11.0pt;mso-bidi-font-size:12.0pt'>Hello
everyone,<o:p></o:p></span></font></span></p>

<p class=3DMsoNormal><span class=3DEmailStyle15><font size=3D2 =
color=3Dblack
face=3D"Times New Roman"><span =
style=3D'font-size:11.0pt;mso-bidi-font-size:12.0pt'><![if =
!supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></font></span></p>

<p class=3DMsoNormal><span class=3DEmailStyle15><font size=3D2 =
color=3Dblack
face=3D"Times New Roman"><span =
style=3D'font-size:11.0pt;mso-bidi-font-size:12.0pt'>This
may seem like a rookie question, but I cannot figure out a way to make =
my own
function in Cold Fusion.<span style=3D"mso-spacerun: yes">&nbsp; =
</span>Am I
missing something?<span style=3D"mso-spacerun: yes">&nbsp; </span>I have =
been
working with it for a month and haven&#8217;t seen anything about =
it.<span
style=3D"mso-spacerun: yes">&nbsp; </span>Can I make calls to a Java =
class or
something like that?<o:p></o:p></span></font></span></p>

<p class=3DMsoNormal><span class=3DEmailStyle15><font size=3D2 =
color=3Dblack
face=3D"Times New Roman"><span =
style=3D'font-size:11.0pt;mso-bidi-font-size:12.0pt'><![if =
!supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></font></span></p>

<p class=3DMsoNormal><span class=3DEmailStyle15><font size=3D2 =
color=3Dblack
face=3D"Times New Roman"><span =
style=3D'font-size:11.0pt;mso-bidi-font-size:12.0pt'>Thanks
in advance,<o:p></o:p></span></font></span></p>

<p class=3DMsoNormal><span class=3DEmailStyle15><font size=3D2 =
color=3Dblack
face=3D"Times New Roman"><span =
style=3D'font-size:11.0pt;mso-bidi-font-size:12.0pt'><![if =
!supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></font></span></p>

<p class=3DMsoNormal><span class=3DEmailStyle15><font size=3D2 =
color=3Dblack
face=3D"Times New Roman"><span =
style=3D'font-size:11.0pt;mso-bidi-font-size:12.0pt'>Brandon
Behrens<o:p></o:p></span></font></span></p>

<p class=3DMsoNormal><span class=3DEmailStyle15><font size=3D2 =
color=3Dblack
face=3D"Times New Roman"><span =
style=3D'font-size:11.0pt;mso-bidi-font-size:12.0pt'><![if =
!supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></font></span></p>

<p class=3DMsoAutoSig><!--[if supportFields]><font color=3Dblack><span=20
style=3D'color:black'><span =
style=3D'mso-element:field-begin'></span><span=20
style=3D"mso-spacerun: yes">&nbsp;</span>AUTOTEXTLIST \s &quot;E-mail=20
Signature&quot; <span =
style=3D'mso-element:field-separator'></span></span></font><![endif]--><f=
ont
size=3D2 color=3Dblack><span =
style=3D'font-size:11.0pt;mso-bidi-font-size:12.0pt;
color:black'>Brandon Behrens</span></font><font size=3D2 =
color=3Dblack><span
style=3D'font-size:11.0pt;mso-bidi-font-size:12.0pt;color:black;mso-color=
-alt:
windowtext'><o:p></o:p></span></font></p>

<p class=3DMsoAutoSig><font size=3D2 color=3Dblack face=3D"Times New =
Roman"><span
style=3D'font-size:11.0pt;mso-bidi-font-size:12.0pt;color:black'>The =
Internet
Design Firm</span></font><font size=3D2 color=3Dblack><span =
style=3D'font-size:11.0pt;
mso-bidi-font-size:12.0pt;color:black;mso-color-alt:windowtext'><o:p></o:=
p></span></font></p>

<p class=3DMsoAutoSig><font size=3D2 color=3Dblack face=3D"Times New =
Roman"><span
style=3D'font-size:11.0pt;mso-bidi-font-size:12.0pt;color:black'>512.451.=
5225</span></font><font
size=3D2 color=3Dblack><span =
style=3D'font-size:11.0pt;mso-bidi-font-size:12.0pt;
color:black;mso-color-alt:windowtext'><o:p></o:p></span></font></p>

<p class=3DMsoAutoSig><font size=3D2 color=3Dblack face=3D"Times New =
Roman"><span
style=3D'font-size:11.0pt;mso-bidi-font-size:12.0pt;color:black'>brandon@=
theidf.com</span></font><font
size=3D2 color=3Dblack><span =
style=3D'font-size:11.0pt;mso-bidi-font-size:12.0pt;
color:black;mso-color-alt:windowtext'><o:p></o:p></span></font></p>

<p class=3DMsoAutoSig><font size=3D2 color=3Dblack face=3D"Times New =
Roman"><span
style=3D'font-size:11.0pt;mso-bidi-font-size:12.0pt;color:black'>http://w=
ww.theidf.com</span></font><font
size=3D2 color=3Dblack><span =
style=3D'font-size:11.0pt;mso-bidi-font-size:12.0pt;
color:black;mso-color-alt:windowtext'><o:p></o:p></span></font></p>

<p class=3DMsoNormal><!--[if supportFields]><font color=3Dblack><span=20
style=3D'color:black'><span =
style=3D'mso-element:field-end'></span></span></font><![endif]--><font
color=3Dblack><span style=3D'color:black'><![if =
!supportEmptyParas]>&nbsp;<![endif]></span></font><font
color=3Dblack><span =
style=3D'color:black;mso-color-alt:windowtext'><o:p></o:p></span></font><=
/p>

</div>

</body>

</html>

------=_NextPart_000_0016_01BFFBA4.BF744660--

----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to