<?xml version="1.0" encoding="utf-8"?>

			<rss version="2.0" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://web.resource.org/cc/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">

			<channel>
			<title>Raymond Camden&apos;s Blog</title>
			<link>http://www.raymondcamden.com/index.cfm</link>
			<description>Raymond Camden&apos;s personal blog covering jQuery, Mobile, ColdFusion, and Web Development.</description>
			<language>en-us</language>
			<pubDate>Wed, 16 May 2012 20:14:52 -0400</pubDate>
			<lastBuildDate>Wed, 16 May 2012 09:38:00 -0400</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>raymondcamden@gmail.com</managingEditor>
			<webMaster>raymondcamden@gmail.com</webMaster>
			<itunes:subtitle></itunes:subtitle>
			<itunes:summary></itunes:summary>
			<itunes:category text="Technology" />
			<itunes:category text="Technology">
				<itunes:category text="Podcasting" />
			</itunes:category>
			<itunes:category text="Technology">
				<itunes:category text="Tech News" />
			</itunes:category>
			<itunes:keywords></itunes:keywords>
			<itunes:author></itunes:author>
			<itunes:owner>
				<itunes:email>raymondcamden@gmail.com</itunes:email>
				<itunes:name></itunes:name>
			</itunes:owner>
			
			<itunes:explicit>no</itunes:explicit>
			
			
			
			
			
			<item>
				<title>Some thoughts on organizing a large jQuery Mobile project</title>
				<link>http://www.raymondcamden.com/index.cfm/2012/5/16/Some-thoughts-on-organizing-a-large-jQuery-Mobile-project</link>
				<description>
				
				
				Ben Forta pinged me with an interesting question (and when the Forta pings you, you respond) that I thought I&apos;d share here. It&apos;s one of those &quot;best practices&quot; questions that really has no best answer, so as always, I&apos;m very eager to hear what my read...
				
				</description>
				
				
				<category>Mobile</category>
				
				<category>Development</category>
				
				<category>jQuery</category>
				
				<category>JavaScript</category>
				
				<category>HTML5</category>
				
				<pubDate>Wed, 16 May 2012 09:38:00 -0400</pubDate>
				<guid>http://www.raymondcamden.com/index.cfm/2012/5/16/Some-thoughts-on-organizing-a-large-jQuery-Mobile-project</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>ColdFusion 10 Released</title>
				<link>http://www.raymondcamden.com/index.cfm/2012/5/14/ColdFusion-10-Released</link>
				<description>
				
				&lt;img src=&quot;http://www.raymondcamden.com/images/fc1e2337-df26-793e-801c-8558803b8cde.jpg&quot; style=&quot;float:left;margin-right: 5px&quot; /&gt; Title says it all. You can now download the final release of &lt;a href=&quot;http://www.adobe.com/products/coldfusion-family.html&quot;&gt;ColdFusion 10&lt;/a&gt;. There&apos;s been a lot of press/blog entries/presentations/videos already on this release so I won&apos;t repeat the feature list, but you can see even more new videos on &lt;a href=&quot;http://tv.adobe.com/product/coldfusion/&quot;&gt;Adobe TV&lt;/a&gt;.
				</description>
				
				
				<category>ColdFusion</category>
				
				<pubDate>Mon, 14 May 2012 22:27:00 -0400</pubDate>
				<guid>http://www.raymondcamden.com/index.cfm/2012/5/14/ColdFusion-10-Released</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Adding &quot;Filter as you type&quot; support to IndexedDB</title>
				<link>http://www.raymondcamden.com/index.cfm/2012/5/14/Adding-Filter-as-you-type-support-to-IndexedDB</link>
				<description>
				
				
				One truly disappointing aspect of IndexedDB is that there is no (simple) support for search across your data. It is very much based on the idea of knowing your keys and fetching data based on those keys. You can easily retrieve the &quot;Ray&quot; user object,...
				
				</description>
				
				
				<category>Development</category>
				
				<category>jQuery</category>
				
				<category>JavaScript</category>
				
				<category>HTML5</category>
				
				<pubDate>Mon, 14 May 2012 13:36:00 -0400</pubDate>
				<guid>http://www.raymondcamden.com/index.cfm/2012/5/14/Adding-Filter-as-you-type-support-to-IndexedDB</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Example of invokeAndPublish with WebSockets and ColdFusion 10</title>
				<link>http://www.raymondcamden.com/index.cfm/2012/5/11/Example-of-invokeAndPublish-with-WebSockets-and-ColdFusion-10</link>
				<description>
				
				While preparing for my &lt;a href=&quot;http://www.raymondcamden.com/index.cfm/2012/5/9/Recording-slides-and-code-from-my-WebSockets-presentation&quot;&gt;presentation&lt;/a&gt; earlier this week on WebSockets and ColdFusion 10, I ran into an issue trying to wrap my head around one of the features: invokeAndPublish. The docs describe it like so:&lt;blockquote&gt;
Invokes a specified method in a CFC file to generate the message that has to be published. Used in scenarios where you have raw data (that needs to be processed) to create a message.
&lt;/blockquote&gt;

They then go on to discuss the JavaScript-side of the feature but not the ColdFusion feature. I couldn&apos;t quite get what was going on here until I built a simple demo. Now - it makes sense. 

As described above - you would use invokeAndPublish when you need ColdFusion to manipulate the message data. Remember, WebSockets are not just for simple messages. You can easily send more complex data as well. (And I&apos;m hoping to do some blog posts showing this soon.) So imagine for a moment you need something that JavaScript can&apos;t do (or can&apos;t do quickly) that is trivial in ColdFusion. You can use invokeAndPublish to run your CFC method and have it generate the result to the other listeners  on the WebSocket. Let&apos;s look at a somewhat trivial example of this.

First - I&apos;ve got my Application.cfc that sets up my recognized WebSocket channels. If you didn&apos;t attend my presentation, or haven&apos;t read the docs yet, this is simply how we enumerate what channels are available to be used.

&lt;script src=&quot;https://gist.github.com/2661583.js?file=gistfile1.cfm&quot;&gt;&lt;/script&gt;

There are a few things in here I want you to ignore for right now so for now - let&apos;s carry on. Next up is our front end. This is an incredibly simple chat type application. You enter text - it gets broadcast - and when messages come in they get printed to screen. That&apos;s it.

&lt;script src=&quot;https://gist.github.com/2661637.js?file=gistfile1.cfm&quot;&gt;&lt;/script&gt;

You can demo this now here: &lt;a href=&quot;http://fivetag-cf10beta.securecb1cf10.ezhostingserver.com/websocketmay11/&quot;&gt;http://fivetag-cf10beta.securecb1cf10.ezhostingserver.com/websocketmay11/&lt;/a&gt;

Ok - so what about invokeAndPublish? This is a method on the JavaScript object. It takes 5 arguments:

&lt;ul&gt;
&lt;li&gt;The websocket channel.
&lt;li&gt;CFC name. &lt;b&gt;This is dot notation and NOT a relative path. This is crucial!&lt;/b&gt; Remember in my Application.cfc where I made a root CF mapping? I did that because I have to use a mapping to refer to my CFC. So imagine I want to hit chat.cfc in the same folder. Instead of simply using &quot;chat&quot;, which the docs seem to imply would work, I must use &quot;root.chat&quot;. 
&lt;li&gt;CFC method. 
&lt;li&gt;Array of arguments for the CFC. Not a structure, but an array. You will want to ensure you nicely list out your arguments in the method. This is optional.
&lt;li&gt;A structure of custom headers. Almost all your WebSocket operations allow for custom headers. This can include a selector as well as anything else you want to send along the wire.
&lt;/ul&gt;

The other &lt;b&gt;very critical&lt;/b&gt; thing you want to know is that the CFC is cached. Hence the &quot;URL hook&quot; in my Application.cfc file to handle reloads. Every time you work on the CFC file you will want to reload the application. 

Let&apos;s consider a simple example where we want to use ColdFusion to count the length of a string. Yes - you can easily do this in JavaScript. I built a CFC that has a method to accept a string and return the length plus the original string:

&lt;script src=&quot;https://gist.github.com/2661698.js?file=gistfile1.cfm&quot;&gt;&lt;/script&gt;

Nothing too crazy there, right? One things the docs don&apos;t make clear is that your CFC should return the value. You don&apos;t use wsPublish. Anything you return from the CFC is broadcast like a regular message. (And to be clear, you can also return complex values here.) On the front end, the change is minimal:

&lt;script src=&quot;https://gist.github.com/2661726.js?file=gistfile1.cfm&quot;&gt;&lt;/script&gt;

A grand total of one line changed. Instead of myWS.publish() I&apos;ve got myWS.invokeAndPublish. My code that listens for responses didn&apos;t need to change. Basically, all we&apos;ve done is said, &quot;Hey, I need ColdFusion to quickly modify stuff before the rest of the world gets it.&quot; 

You can demo this version by hitting the big ole demo button below. Hope this helps!

&lt;a href=&quot;http://fivetag-cf10beta.securecb1cf10.ezhostingserver.com/websocketmay11/index2.cfm&quot;&gt;&lt;img src=&quot;http://www.raymondcamden.com/images/icon_128.png&quot; title=&quot;Demo, Baby&quot; border=&quot;0&quot;&gt;&lt;/a&gt;
				</description>
				
				
				<category>jQuery</category>
				
				<category>JavaScript</category>
				
				<category>HTML5</category>
				
				<category>ColdFusion</category>
				
				<pubDate>Fri, 11 May 2012 13:27:00 -0400</pubDate>
				<guid>http://www.raymondcamden.com/index.cfm/2012/5/11/Example-of-invokeAndPublish-with-WebSockets-and-ColdFusion-10</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Using CFC data with Handlebars</title>
				<link>http://www.raymondcamden.com/index.cfm/2012/5/11/Using-CFC-data-with-Handlebars</link>
				<description>
				
				
				Earlier this week Steve wrote to me asking how to use data retrieved in a ColdFusion Component in a Handlebars template. While ColdFusion makes it trivial to serve up query data via JSON, the result format isn&apos;t always easy to use in JavaScript utili...
				
				</description>
				
				
				<category>jQuery</category>
				
				<category>JavaScript</category>
				
				<category>HTML5</category>
				
				<category>ColdFusion</category>
				
				<pubDate>Fri, 11 May 2012 09:46:00 -0400</pubDate>
				<guid>http://www.raymondcamden.com/index.cfm/2012/5/11/Using-CFC-data-with-Handlebars</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Setting up console debugging for PhoneGap and Android</title>
				<link>http://www.raymondcamden.com/index.cfm/2012/5/10/Setting-up-console-debugging-for-PhoneGap-and-Android</link>
				<description>
				
				
				In case you haven&apos;t figured it out yet, debugging in mobile is &quot;sub-optimal&quot;. (Whatever you do - don&apos;t do a Google Images search on sub-optimal.) Brian Leroux has an epic presentation on the topic and I highly encourage taking a look through it. I th...
				
				</description>
				
				
				<category>Mobile</category>
				
				<category>Development</category>
				
				<category>JavaScript</category>
				
				<pubDate>Thu, 10 May 2012 10:08:00 -0400</pubDate>
				<guid>http://www.raymondcamden.com/index.cfm/2012/5/10/Setting-up-console-debugging-for-PhoneGap-and-Android</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Recording, slides, and code from my WebSockets presentation</title>
				<link>http://www.raymondcamden.com/index.cfm/2012/5/9/Recording-slides-and-code-from-my-WebSockets-presentation</link>
				<description>
				
				
				Enjoy. I&apos;m going to have some followup blog posts on this coming up this week.

Recording URL: http://experts.adobeconnect.com/p459pvx19cw/

The demo files may be found at the bottom of this blog post.

 Using WebSockets with ColdFusion   View ...
				
				</description>
				
				
				<category>Development</category>
				
				<category>JavaScript</category>
				
				<category>HTML5</category>
				
				<category>ColdFusion</category>
				
				<pubDate>Wed, 09 May 2012 20:43:00 -0400</pubDate>
				<guid>http://www.raymondcamden.com/index.cfm/2012/5/9/Recording-slides-and-code-from-my-WebSockets-presentation</guid>
				
				
				<enclosure url="http://www.raymondcamden.com/enclosures/Websockets with ColdFusion.zip" length="1909962" type="application/x-zip-compressed"/>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Transcripts from PhoneGap Session</title>
				<link>http://www.raymondcamden.com/index.cfm/2012/5/8/Transcripts-from-PhoneGap-Session</link>
				<description>
				
				
				First off - a huge thank you to everyone who came to our PhoneGap Open Q and A today. We had more than 50 attendees for most of the two hour block which I think is a great turnout. We even had a troll (for a few minutes), so that means we must be doi...
				
				</description>
				
				
				<category>Mobile</category>
				
				<category>Development</category>
				
				<category>JavaScript</category>
				
				<category>HTML5</category>
				
				<pubDate>Tue, 08 May 2012 16:31:00 -0400</pubDate>
				<guid>http://www.raymondcamden.com/index.cfm/2012/5/8/Transcripts-from-PhoneGap-Session</guid>
				
				
				<enclosure url="http://www.raymondcamden.com/enclosures/sessionlogs.zip" length="608560" type="application/x-zip-compressed"/>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Very cool BOF at cfObjective</title>
				<link>http://www.raymondcamden.com/index.cfm/2012/5/8/Very-cool-BOF-at-cfObjective</link>
				<description>
				
				
				Just a quick shout out to remember the BOFs (Birds of a Feather) at this year&apos;s cfObjective. You can see the full list here: Birds of a Feather Sessions Announced. While they are all cool, I wanted to call out the CFScript Community Components BOF be...
				
				</description>
				
				
				<category>ColdFusion</category>
				
				<pubDate>Tue, 08 May 2012 09:17:00 -0400</pubDate>
				<guid>http://www.raymondcamden.com/index.cfm/2012/5/8/Very-cool-BOF-at-cfObjective</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Open Session on PhoneGap Development</title>
				<link>http://www.raymondcamden.com/index.cfm/2012/5/7/Open-Session-on-PhoneGap-Development</link>
				<description>
				
				
				Curious about PhoneGap? Have questions? Tomorrow, Andrew Trice and myself are hosting a 2-hour Adobe Connect session on PhoneGap. This will be an open session for your questions, not a presentation. The Connect URL is: http://my.adobeconnect.com/adob...
				
				</description>
				
				
				<category>Mobile</category>
				
				<category>Development</category>
				
				<category>HTML5</category>
				
				<pubDate>Mon, 07 May 2012 08:59:00 -0400</pubDate>
				<guid>http://www.raymondcamden.com/index.cfm/2012/5/7/Open-Session-on-PhoneGap-Development</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Converting a dynamic web site to a PhoneGap application</title>
				<link>http://www.raymondcamden.com/index.cfm/2012/5/5/Converting-a-dynamic-web-site-to-a-PhoneGap-application</link>
				<description>
				
				
				Earlier today a reader asked me about the possibility of converting his mobile-friendly site into a &quot;real&quot; application via PhoneGap. I told him that this could be very easy. You can take your HTML, upload it to the PhoneGap Builder service, and see w...
				
				</description>
				
				
				<category>Mobile</category>
				
				<category>Development</category>
				
				<category>jQuery</category>
				
				<category>JavaScript</category>
				
				<category>HTML5</category>
				
				<category>ColdFusion</category>
				
				<pubDate>Sat, 05 May 2012 11:30:00 -0400</pubDate>
				<guid>http://www.raymondcamden.com/index.cfm/2012/5/5/Converting-a-dynamic-web-site-to-a-PhoneGap-application</guid>
				
				
				<enclosure url="http://www.raymondcamden.com/enclosures/conversion.zip" length="195079" type="application/x-zip-compressed"/>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>jQuery Mobile Web Development Essentials - Released</title>
				<link>http://www.raymondcamden.com/index.cfm/2012/5/4/jQuery-Mobile-Web-Development-Essentials--Released</link>
				<description>
				
				
				 It is here! Finally. 100% done. (Although Amazon still says it isn&apos;t released - that should be corrected soon.) The jQuery Mobile book I wrote with Andy Matthews is now published. The book covers creating jQuery Mobile apps and is up to date to the ...
				
				</description>
				
				
				<category>Mobile</category>
				
				<category>Development</category>
				
				<category>jQuery</category>
				
				<category>JavaScript</category>
				
				<pubDate>Fri, 04 May 2012 08:58:00 -0400</pubDate>
				<guid>http://www.raymondcamden.com/index.cfm/2012/5/4/jQuery-Mobile-Web-Development-Essentials--Released</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Presenting on ColdFusion 10 and WebSockets</title>
				<link>http://www.raymondcamden.com/index.cfm/2012/5/3/Presenting-on-ColdFusion-10-and-WebSockets</link>
				<description>
				
				
				Next week (Wednesday night) I&apos;ll be doing a presentation on ColdFusion 10 and WebSockets for the Salt Lake City ColdFusion User Group. This meeting is open to the public. Details (along with Connect URL) are available here:

WebSockets on ColdFusio...
				
				</description>
				
				
				<category>JavaScript</category>
				
				<category>HTML5</category>
				
				<category>ColdFusion</category>
				
				<pubDate>Thu, 03 May 2012 12:59:00 -0400</pubDate>
				<guid>http://www.raymondcamden.com/index.cfm/2012/5/3/Presenting-on-ColdFusion-10-and-WebSockets</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>This is why Adobe Shadow rocks</title>
				<link>http://www.raymondcamden.com/index.cfm/2012/5/2/This-is-why-Adobe-Shadow-rocks</link>
				<description>
				
				
				 I&apos;ve blogged about Adobe Shadow before, and I&apos;ve played with it, but I don&apos;t think I truly appreciated it till just now.

A coworker pinged me about an issue he was having with a jQuery Mobile page and iOS. I got the code from him, dropped it in m...
				
				</description>
				
				
				<category>Mobile</category>
				
				<category>Development</category>
				
				<category>HTML5</category>
				
				<pubDate>Wed, 02 May 2012 14:46:00 -0400</pubDate>
				<guid>http://www.raymondcamden.com/index.cfm/2012/5/2/This-is-why-Adobe-Shadow-rocks</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Example of Intents with PhoneGap</title>
				<link>http://www.raymondcamden.com/index.cfm/2012/5/1/Example-of-Intents-with-PhoneGap</link>
				<description>
				
				
				This weekend I was reading an email on my phone when I noticed something odd. The link, to a Wikipedia article, prompted me to ask if I wanted to load it in my browser, or in the Wikipedia app. Knowing that the Wikipedia app was built with PhoneGap, ...
				
				</description>
				
				
				<category>Mobile</category>
				
				<category>Development</category>
				
				<category>JavaScript</category>
				
				<category>HTML5</category>
				
				<pubDate>Tue, 01 May 2012 13:59:00 -0400</pubDate>
				<guid>http://www.raymondcamden.com/index.cfm/2012/5/1/Example-of-Intents-with-PhoneGap</guid>
				
				
				<enclosure url="http://www.raymondcamden.com/enclosures/intenttest.zip" length="560974" type="application/x-zip-compressed"/>
				
				
			</item>
			
		 	
			</channel></rss>
