ColdFusion 8 Ajax Feed Reader

Posted By : todd sharp Posted At : February 12, 2008 4:01 PM Posted In: Ajax, ColdFusion

22

If you've ever checked out Ext you've probably seen the feed viewer sample application.

A while back I decided to see how quickly I could recreate that viewer using ColdFusion 8 Ajax. I ended up using some Spry bits for listeners - but overall much of the code is pretty simple. I'm not going to bother posting the code unless someone really wants to see it - I just wanted to get this out there as a cool demo of the power/simplicity of ColdFusion 8 Ajax.

Here it is

Oh - I almost forgot - if you try to view a post from a BlogCFC blog it will bust out of the application and take over your window. This is not a bug but an intentional feature of BlogCFC to keep folks from harvesting your content. If you add a non-BlogCFC feed and try to view a post in a new tab you'll see the feature.

Comments (22)

Anuj Gakhar's Gravatar That is cool! I tried the same stuff once but I didnt get as far as you. I am sure doing it in CF8 is faster than writing it using EXT.

Rey Bango's Gravatar @Anuj: Yes it typically will be faster but you will definitely not be able to leverage the breadth of new features included in Ext v2.0 via what's included in CF8. CF8 is shipped w/ Ext v1.0 and that version pales in comparison to v2.0.

There are some external projects that aim to provide CF wrappers for Ext 2.0 but they're not native to the CF8 engine at this point.

So for complete, robust access to all Ext offers, you need to go past what's included in CF8 and use Ext v2.0.

Anuj Gakhar's Gravatar @Rey, yes you are right. I have looked at these external projects like CFEXT (CF_Window) and there has been a lot of effort on this and the good thing is these custom tags can be used with CF7 as well.

todd's Gravatar I'd also like to see some discussion about Ext vs. Spry.

Dreamweaver CS3 seems to have settled on Spry while CF8 has settled on Ext (1.0). Apparently, Adobe divisions do not talk to each other.

I can't decide between them. I find Ext (at least teh 1.0 version used in CF) to be difficult and frustrating to use. Prototype.js was easy. I haven't yet tried Spry.

Anuj Gakhar's Gravatar Thats a good point of Adobe divisions not talking to each other. Another example is CF using Derby and Flex using Sqlite. Sounds a bit weird to me.

Joshua's Gravatar I thought there was a bit of spry built in?

For what its worth I think a lot of the functionality of CF8 was done a long time before Spry was ready. Had Spry been at the state it is now 2 years ago we would see lots more integration (in my estimation), and I suspect CF9 will show that.

I find spry dead simple for some tasks. Specifically form validation. Really handy. The data sorting and such available is also quite easy with spry.

todd sharp's Gravatar Josh: Yep, and I used that where I could (<cfsprydataset>) - but the listeners I did manually. I do have an updated version that is much simplified, but it wouldn't work on the version of CF that I have on my server.

David's Gravatar As someone new to CF, is the Ext client-side code all auto generated by CF tags? In other words, you can produce something siilar to your example without having to know Ext? Will it be possible to post or send me the source code so I can use it for my own learning purposes?

Many thanks.

todd sharp's Gravatar David: I sent the code last night, did you get it?

cfJeff's Gravatar Great demo. RiaForge that one...

Also, I added the PUCO news feed and couldn't figure out how to remove it.

todd sharp's Gravatar No worries Jeff, the feed list is recreated onApplicationStart().

Ability to delete/modify feeds is a good idea - If I get the time I shall add that!

sal's Gravatar Interested in the source (pure learning purposes)? I've dabbled in AJAX requests using CFMX7 & mootools, however I wanna start taking advantage of CF8...

cheers

VinnyP's Gravatar Todd,
This is awesome! Can I get a copy of this source for research purposes? I want to understand the ideas and concepts you are presenting.

Jason's Gravatar i was looking at how to get cfgrid and other components to act more like its ext-parents. can you send me this source code too.

Paul Baylis's Gravatar Hi there,
I'm in New Zealand and learning Mach-II right now and would like to see your code please. it would be a perfect way to learn two valuable things at once - Mach-II and Ajax.
Many thanks!

todd sharp's Gravatar For those who have asked for the code, I've updated the post and attached the zip. It's a bit messy, but should give you the general idea about what's going on.

Edward Beckett's Gravatar Todd ... is there a way that the BlogCFC code can be updated to allow for the content to be viewed in a tab?

Edward

todd sharp's Gravatar Well, unfortunately it's being done intentionally. See this post:

http://www.coldfusionjedi.com/index.cfm/2006/8/18/...

So to view them in tabs, each blog would have to remove that code...

Jackie's Gravatar Nice one and great demo

tytr's Gravatar ytreytreytreytreytretyretyreytyerytreyrt

forex's Gravatar great i like this solution

UK Laptop Battery's Gravatar bright future for ColdFusion? I really hope so~!!