|
|
Creating an RSS Reader?
|
|
|
|
Fresh-Faced Recruit
Join Date: Nov 2003
Location: _-UK-_
Status:
Offline
|
|
I would like to create my own RSS reader application for OS X using Cocoa and Xcode, but I do not have much experience in programing on the Mac.
I was wondering of anyone could point me in the direction of any decent online tutorials for 'building you own' RSS reader, or if anyone knows of any books that cover this topic.
Thanks in advance
|
12" PB revB
|
|
|
|
|
|
|
|
Senior User
Join Date: Feb 2001
Location: Deer Crossing, CT
Status:
Offline
|
|
This site has links to many open source RSS reader projects in multiple languages (Perl, Smalltalk, Java) --> http://www.rssfeeds.com/readers.php . Got this from a simple Google search on 'open source RSS reader OS X'.
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Jun 2000
Location: New York, NY
Status:
Offline
|
|
I haven't played with it, but I have seen an xml parser header file while poking around in one of apple's frameworks... you'll probably need that... easier than compiling an xml parser from the web.
Now... to get the xml from the web:
Safari uses an NSView subclass to render webpages. This view is available to you thru webkit (don't remember the name, but make a webkit app in xcode and you'll see it).
The displaying of the webpage and the fetching the webpage's html are done by two different objects (again, at work on my peecee or i'd give you the name, but look at the sample web browser in apple's examples to find it). You can have an instance of this fetching object w/out the part that renders the webpage. So...
You can use it to fetch a url then view the text from that url (this will be your xml), and then parse it and display it how you want to.
Good luck!
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Nov 2003
Location: _-UK-_
Status:
Offline
|
|
Thanks for the replies guys
Poulh - I'll be giving what you suggested a try today, it made quite a bit of sense to me so hopefully I'll able to get something working. Thanks very much for your help
|
12" PB revB
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Jun 2000
Location: New York, NY
Status:
Offline
|
|
Glad to help...
When designing the app you may want to consider making a separate object that goes out and gets the xml... then has methods like getHeading getLink getSummary that return the data.
Then make your rss app that uses the object. That way the interface is separate from the guts of the code.
An advantage to this is if say weather.com had an rss feed you could use the xmlGetter object to get the data and write a little weather monitor app on top that would look different from an rss reader.
Or you could make a screen saver that displayed rss headlines.
Re-usable code is a wonderful thing!
(
Last edited by poulh; Apr 8, 2005 at 02:58 PM.
)
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Nov 2001
Location: Melboune, Australia
Status:
Offline
|
|
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Nov 2003
Location: _-UK-_
Status:
Offline
|
|
Thanks for that link, that is a great little app he has done.
I now thinking that I might use the Parser contained within that app for my own reader (as it is Open Source) saving me a lot of time and effort.
Just need to figure out how it works so I can pass it my URL's and call in things like the titles and headings into the relevant parts of my interface.
Thanks again
|
12" PB revB
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Jun 2000
Location: New York, NY
Status:
Offline
|
|
just found a function that will help you out..
in NSString
+ (id)stringWithContentsOfURL NSURL *)url;
will put the whole xml file into a string
|
|
|
|
|
|
|
|
|
Senior User
Join Date: Apr 2005
Status:
Offline
|
|
Originally Posted by Baldrick
I would like to create my own RSS reader application for OS X using Cocoa and Xcode, but I do not have much experience in programing on the Mac.
I was wondering of anyone could point me in the direction of any decent online tutorials for 'building you own' RSS reader, or if anyone knows of any books that cover this topic.
Thanks in advance
For kicks I built an RSS reader using REALBasic and AppleScript - the AppleScripts ran some curl commands to get the XML which I then parsed in REALBasic - probably not the most efficient method but I was experimenting.
|
|
|
|
|
|
|
|
|
Banned
Join Date: Apr 2002
Location: -
Status:
Offline
|
|
you might want to check out the new Syndication private framework in Tiger...
looks interesting to me.
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Jun 2000
Location: New York, NY
Status:
Offline
|
|
Originally Posted by ambush
you might want to check out the new Syndication private framework in Tiger...
looks interesting to me.
ambush... you have any more details on what this is?
i think Baldrick is making the app to learn how to code.
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status:
Offline
|
|
Why bother using an unsupported private framework when existing sample code is widely available, and doesn't limit your userbase?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|