p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

coldfusion thread: Whatz the Difference between the tags CFINCLUDE and CFMODULE


Message #1 by "Ramamoorthy, Buvanendiran" <Buvanendiran_Ramamoorthy@s...> on Wed, 19 Jun 2002 07:15:42 -0400
Hi ALL,

Can anybody tell me about the Differences between the tags CFINCLUDE and
CFMODULE
I just want to call a program as the same way a function is getting called
in C++..
but CFINCLUDE just replaces the code in the program just like inline
functions in C++.

help me out in this regard..

regards,
Buva....
Message #2 by "Mark A. Kruger - CFG" <mkruger@c...> on Wed, 19 Jun 2002 07:41:27 -0500
Ram,

Cmodule allows you to call a template as if it were a custom tag.  You can
pass values in as attributes... then within the template, you can set
values in the calling template by using the "caller" scope.  It's not the
same as a function call, but you can emulate the behavior this way.  You can
also create your own functions (UDF's) that work exactly like a function
using the <cfscript> and the "function" keyword.  If you've ever done any
Javascript it will look quite familiar. Finally, if you are using CFMX, you
can create functions using the <CFFUNCTION> tag, or you can create CFC's
which are rather like classes. good luck.

Mark A. Kruger, MCSE, CFG
www.cfwebtools.com
www.necfug.com
...no more brochures!



-----Original Message-----
From: Ramamoorthy, Buvanendiran
[mailto:Buvanendiran_Ramamoorthy@s...]
Sent: Wednesday, June 19, 2002 6:16 AM
To: Coldfusion
Subject: [coldfusion] Whatz the Difference between the tags CFINCLUDE
and CFMODULE


Hi ALL,

Can anybody tell me about the Differences between the tags CFINCLUDE and
CFMODULE
I just want to call a program as the same way a function is getting called
in C++..
but CFINCLUDE just replaces the code in the program just like inline
functions in C++.

help me out in this regard..

regards,
Buva....



Message #3 by "Ramamoorthy, Buvanendiran" <Buvanendiran_Ramamoorthy@s...> on Wed, 19 Jun 2002 08:48:50 -0400
Thanx a ton Mark...

I'll try it out.

regards,
Buvanendiran Ramamoorthy


> -----Original Message-----
> From:	Mark A. Kruger - CFG [SMTP:mkruger@c...]
> Sent:	Wednesday, June 19, 2002 6:11 PM
> To:	Coldfusion
> Subject:	[coldfusion] RE: Whatz the Difference between the tags
> CFINCLUDE and CFMODULE
> 
> Ram,
> 
> Cmodule allows you to call a template as if it were a custom tag.  You can
> pass values in as attributes... then within the template, you can set
> values in the calling template by using the "caller" scope.  It's not the
> same as a function call, but you can emulate the behavior this way.  You
> can
> also create your own functions (UDF's) that work exactly like a function
> using the <cfscript> and the "function" keyword.  If you've ever done any
> Javascript it will look quite familiar. Finally, if you are using CFMX,
> you
> can create functions using the <CFFUNCTION> tag, or you can create CFC's
> which are rather like classes. good luck.
> 
> Mark A. Kruger, MCSE, CFG
> www.cfwebtools.com
> www.necfug.com
> ...no more brochures!
> 
> 
> 
> -----Original Message-----
> From: Ramamoorthy, Buvanendiran
> [mailto:Buvanendiran_Ramamoorthy@s...]
> Sent: Wednesday, June 19, 2002 6:16 AM
> To: Coldfusion
> Subject: [coldfusion] Whatz the Difference between the tags CFINCLUDE
> and CFMODULE
> 
> 
> Hi ALL,
> 
> Can anybody tell me about the Differences between the tags CFINCLUDE and
> CFMODULE
> I just want to call a program as the same way a function is getting called
> in C++..
> but CFINCLUDE just replaces the code in the program just like inline
> functions in C++.
> 
> help me out in this regard..
> 
> regards,
> Buva....
> 
> 
> 
> 
Message #4 by "Haslett, Andrew" <andrew.haslett@i...> on Thu, 20 Jun 2002 12:08:17 +0930
Thank god for that :=))  

Coming from a type of 'purist' coding background, it really annoyed me that
we couldn't call a custom tag as if it was a function in CF5. Having to use
UDF's to perform this task, in which we didn't have access to the native CF
tags, seemed very restrictive.

Might have to give it another go with MX!

Cheers,
Andrew

-----Original Message-----
From: Mark A. Kruger - CFG [mailto:mkruger@c...]
Sent: Wednesday, 19 June 2002 10:11 PM
To: Coldfusion
Subject: [coldfusion] RE: Whatz the Difference between the tags
CFINCLUDE and CFMODULE


Ram,

Cmodule allows you to call a template as if it were a custom tag.  You can
pass values in as attributes... then within the template, you can set
values in the calling template by using the "caller" scope.  It's not the
same as a function call, but you can emulate the behavior this way.  You can
also create your own functions (UDF's) that work exactly like a function
using the <cfscript> and the "function" keyword.  If you've ever done any
Javascript it will look quite familiar. Finally, if you are using CFMX, you
can create functions using the <CFFUNCTION> tag, or you can create CFC's
which are rather like classes. good luck.

Mark A. Kruger, MCSE, CFG
www.cfwebtools.com
www.necfug.com
...no more brochures!



-----Original Message-----
From: Ramamoorthy, Buvanendiran
[mailto:Buvanendiran_Ramamoorthy@s...]
Sent: Wednesday, June 19, 2002 6:16 AM
To: Coldfusion
Subject: [coldfusion] Whatz the Difference between the tags CFINCLUDE
and CFMODULE


Hi ALL,

Can anybody tell me about the Differences between the tags CFINCLUDE and
CFMODULE
I just want to call a program as the same way a function is getting called
in C++..
but CFINCLUDE just replaces the code in the program just like inline
functions in C++.

help me out in this regard..

regards,
Buva....




Message #5 by "Mark A. Kruger - CFG" <mkruger@c...> on Thu, 20 Jun 2002 08:37:33 -0500
Yeah... all true - but it's all coming together.  CFMX and CFCs are really a
giant leap forward in that regard.  A CFC can be called by a Cold fusion
server locally (like a custom tag) or remotely. It can also be called by a
Flash movie using a native data transfer (really lean!) and it can be called
remotely as a web service by any .NET or soap aware process.  Pretty nifty
stuff.

-mk

-----Original Message-----
From: Haslett, Andrew [mailto:andrew.haslett@i...]
Sent: Wednesday, June 19, 2002 9:38 PM
To: Coldfusion
Subject: [coldfusion] RE: Whatz the Difference between the tags CFINCL
UDE and CFMODULE


Thank god for that :=))

Coming from a type of 'purist' coding background, it really annoyed me that
we couldn't call a custom tag as if it was a function in CF5. Having to use
UDF's to perform this task, in which we didn't have access to the native CF
tags, seemed very restrictive.

Might have to give it another go with MX!

Cheers,
Andrew

-----Original Message-----
From: Mark A. Kruger - CFG [mailto:mkruger@c...]
Sent: Wednesday, 19 June 2002 10:11 PM
To: Coldfusion
Subject: [coldfusion] RE: Whatz the Difference between the tags
CFINCLUDE and CFMODULE


Ram,

Cmodule allows you to call a template as if it were a custom tag.  You can
pass values in as attributes... then within the template, you can set
values in the calling template by using the "caller" scope.  It's not the
same as a function call, but you can emulate the behavior this way.  You can
also create your own functions (UDF's) that work exactly like a function
using the <cfscript> and the "function" keyword.  If you've ever done any
Javascript it will look quite familiar. Finally, if you are using CFMX, you
can create functions using the <CFFUNCTION> tag, or you can create CFC's
which are rather like classes. good luck.

Mark A. Kruger, MCSE, CFG
www.cfwebtools.com
www.necfug.com
...no more brochures!



-----Original Message-----
From: Ramamoorthy, Buvanendiran
[mailto:Buvanendiran_Ramamoorthy@s...]
Sent: Wednesday, June 19, 2002 6:16 AM
To: Coldfusion
Subject: [coldfusion] Whatz the Difference between the tags CFINCLUDE
and CFMODULE


Hi ALL,

Can anybody tell me about the Differences between the tags CFINCLUDE and
CFMODULE
I just want to call a program as the same way a function is getting called
in C++..
but CFINCLUDE just replaces the code in the program just like inline
functions in C++.

help me out in this regard..

regards,
Buva....








  Return to Index