Wrox Programmer Forums
|
BOOK: Professional Ajax ISBN: 978-0-471-77778-6
This is the forum to discuss the Wrox book Professional Ajax by Nicholas C. Zakas, Jeremy McPeak, Joe Fawcett; ISBN: 9780471777786
Important: For the new 2nd edition of this book, please post here instead: [url="http://p2p.wrox.com/forum.asp?FORUM_ID=307"]http://p2p.wrox.com/forum.asp?FORUM_ID=307[/url]
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Ajax ISBN: 978-0-471-77778-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 10th, 2006, 03:37 AM
Friend of Wrox
 
Join Date: May 2005
Posts: 140
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 5 RSS Feeds

Hallo all,

I am now trying to understand this FooReader example but the client side code is written in C# not in normal DHTML with JavaScript. Can anyone briefly tell me how to get these RSS Feeds via JavaScript? I couldn't understand this C# code.

Your attitude determines your altitude
__________________
Your attitude determines your altitude
 
Old October 10th, 2006, 07:04 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

RSS feeds are just XML documents so you just retrieve them using XMLHttpRequest, in Mozilla, or XmlHttp, in IE on Windows, if you want to do this client-side. What's your particular difficulty?

--

Joe (Microsoft MVP - XML)
 
Old October 10th, 2006, 08:02 AM
Friend of Wrox
 
Join Date: May 2005
Posts: 140
Thanks: 0
Thanked 0 Times in 0 Posts
Default

My difficulty was to understand this C# code. I could have understood the AJAX applications what they didand now I am thinking of how I can create an aggregator via XMLHTTP (we are using IE)for multi RSS resources. I am very confused now.

Your attitude determines your altitude
 
Old October 20th, 2006, 11:34 PM
jmcpeak's Avatar
Wrox Author
 
Join Date: Nov 2005
Posts: 87
Thanks: 0
Thanked 18 Times in 17 Posts
Default

If I'm understanding you correctly, you want to bypass the server-side component and retrieve XML feeds with JavaScript. Unless the XML feeds reside on the same domain that your JavaScript does, you cannot do this.

There are two components in FooReader.NET. First is the client-side component, which is written in JavaScript and uses DHTML to dynamically add content to the page. The second is the server component, which is written in C#. FooReader.NET is written in this way because JavaScript cannot retrieve RSS or Atom feeds that reside on a different server due to security restrictions. This problem is circumvented by using a server-side application to act as a proxy.

In FooReader.NET, we use JavaScript to communicate with the server-side component which retrieves RSS and Atom feeds from remote servers. The server-side component then sends the retrieved XML feed to the browser where it's parsed and added to the web page.

If the XML feeds you want to retrieve do reside on the same domain as your JavaScript, you can use a simple XMLHttp request to download the feed, parse it, and add it to the page.

------------------------
Jeremy McPeak
Author, Professional Ajax
http://www.wdonline.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Rss feeds SKhna ASP.NET 2.0 Basics 0 April 17th, 2008 05:00 AM
Rss feeds SKhna ASP.NET 2.0 Basics 3 March 20th, 2008 02:07 PM
RSS Feeds with JavaScript NEO1976 Javascript How-To 0 October 6th, 2006 09:13 AM
RSS feeds from the forum? javatis Forum and Wrox.com Feedback 1 February 2nd, 2006 03:44 PM
RSS Feeds harpua PHP How-To 4 October 21st, 2005 09:59 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.