<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Oinam&#039;s Blog &#187; ColdFusion</title>
	<atom:link href="http://blog.oinam.com/category/coldfusion/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.oinam.com</link>
	<description>All about Oinam</description>
	<lastBuildDate>Fri, 17 Oct 2008 11:27:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>AjaxCFC</title>
		<link>http://blog.oinam.com/2006/ajaxcfc/</link>
		<comments>http://blog.oinam.com/2006/ajaxcfc/#comments</comments>
		<pubDate>Tue, 17 Jan 2006 21:05:04 +0000</pubDate>
		<dc:creator>Ashish</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[ColdFusion]]></category>

		<guid isPermaLink="false">http://www.oinam.com/__blog/?p=14</guid>
		<description><![CDATA[ColdFusion, Ajax, AjaxCFC, Rob Gonda]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.robgonda.com/blog/projects/ajaxcfc/" title="AjaxCFC">AjaxCFC</a> is an <a href="http://www.adaptivepath.com/publications/essays/archives/000385.php" title="Ajax">Ajax</a> Framework for ColdFusion from <a href="http://www.robgonda.com/blog/" title="Rob Gonda">Rob Gonda</a>. Well, my reaction after going through it was <strong><span class="caps">AWESOME</span></strong> and huge thanks to it, lately have been able to finish up a small Messaging System integrated inside one of a Rich Internet Application, <a href="http://www.livespeeddating.com/" title="Live Speed Dating">Live Speed Dating</a>.</p>

<p>With AjaxCFC, a generic ColdFusion Component using the facade pattern was created which contains all the methods for the Messaging System. It made it so easy for me that I had to just take care of the functionality of a single method; <code>DWREngine._execute()</code> with the respective arguments. This is the method which handles passing of the data and also the method calls to ColdFusion. The arguments required are also quite simple and easy even for a newbie to understand.<br />
<span id="more-14"></span><br />
Looking at the method signature of the function;</p>

<pre><code language="cf">DWREngine._execute(_ajaxConfig.cfscriptLocation, null, ‘CFmethodName’, args, callBackFunction);</code></pre>

<p>Though you can pass multiple arguments, my preference is to use a value object instead. Let us look at some points in respect to the particular Module of the <span class="caps">RIA </span>which I am currently working.</p>


<ol>
<li>The _ajaxConfig.cfscriptLocation is the actual path to the <span class="caps">CFC </span>which contains the methods I need to call for my mailing system.</li>
<li>The second argument is the script name to be executed. This argument is null most of the times.</li>
<li>The CFmethodName is the name of the method you want to call from the <span class="caps">CFC.</span></li>
<li>The fourth parameter to this function is the arguments you wish to pass to the CFmethod. You can pass more than one arguments or even a value object.</li>
<li>The callBackFunction is the function in JavaScript in your <span class="caps">CFM </span>which will always take a single argument which is the return result you get from your <span class="caps">CFC.</span></li>
</ol>



<p>Well, the bottomline is that in order to use our <span class="caps">CFC </span>with the <a href="http://www.robgonda.com/blog/projects/ajaxcfc/" title="AjaxCFC">AjaxCFC</a> framework, all I had to do was extend my <span class="caps">CFC </span>to the ajax.cfc which comes along with the framework.</p>

<p>Implementing AjaxCFC into my application, not only made things faster and easier for me but also enriched the end user experience for our module, the Messaging System. Thanks to <a href="http://www.robgonda.com/blog/" title="Rob Gonda">Rob Gonda</a>, now I am looking forward to incorporate AjaxCFC with the <a href="http://www.model-glue.com/" title="Model-Glue">Model-Glue</a> framework which I have used for <a href="http://www.livespeeddating.com/" title="Live Speed Dating">Live Speed Dating</a>. </p>

<p><em>Note:</em><br />
The client side part of AjaxCFC was tackled by one of my colleague, Manaswinee. She will very soon be having an article on the same. Keep an eye on her article to get an insight on the callback functions and how the data is handled at the client side.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.oinam.com/2006/ajaxcfc/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
