In 30: Yahoo Pipes in ColdFusion
In 30I like to spend some time writing proof of concept (POC) code. If such an experiment works I will often use it in an application and write it properly. Like many I have been impressed with the Yahoo Pipes. At a basic level Yahoo Pipes puts together two or more RSS feeds. Here I'll show how to do the backend in CF.
Ok first I made a pipe for myself of Ben Forta and Ray Camden's blog feeds which you can see here.
So, CF 7 does not handle RSS feeds natively but fortunately Ray Camden (does the man ever sleep? :)) has written a RSS.cfc that will read and write feeds. So with that downloaded I created an array of feeds.
Next lets create an object of RSS and then loop over that array and put the results of the feed in an array.
So now we have an array with a query of feeds but we really want to make one query. Time to step up Query-of-Queries! And the UNION operator. Though one limitation is that Q-o-Q's need to refer to a query that does not have a dot in it. D'oh. However, the code below will get around that by setting a variable to the array with the query. Not fully sustainable but this is a POC.
Not the qry1.[date] notation to get around reserved words in Query-of-Queries.
Now a little outputting:
And the concept has been proved!
Full code:






Loading....