Source to BSTwitterApp
It doesn't post! It doesn't store your password in the keychain! It doesn't automatically refresh! It's useless! Just a demo! Don't worry, Craig! ;)
(BS... my initials come in handy sometimes. ;)
The idea behind this app is to show some basic use of the technologies that folks writing hybrid apps in Cocoa use. It uses NSXMLDocument and XPath to parse the friends tweets, WebKit to display the tweets, and NSURLConnection to download the tweets.
It also demonstrates that just doing the plumbing—downloading and parsing—is only the barest beginning. For Mac apps, the magic is in the user interface. This doesn’t have any of that magic.
(Folks who aren’t developers sometimes think that apps like Twitterrific are 90% under-the-hood plumbing and a 10% sprinkling of user interface. The truth is more likely the opposite: 10% plumbing, 90% user interface.)
The coolest part of this is the code that parses the Twitter friends timeline. The parser is really very small. (And I’ve heard that there are ways to do it in even less code.) The central part of the parser is +[BSTwitterParser _parsedObjectWithNode:], which shows some very basic use of XPath to get data from an NSXMLNode.