Archive for January 13th, 2011


Twitter News Backend

Well, put this one down in the “too obvious to occur to us” category:

Using Twitter as a Backend(!)

Do you need a simple news feed for your application? You could probably rent a piece of server and code something in PHP, Ruby or Python, you could for example use google app engine as your backend.

But did you think about using Twitter?

No. No, we’ve implemented custom server managed news feeds, RSS news feeds, and probably half a dozen others that escape us at the moment … but using Twitter, that never occurred to us. And now that we think about it, there’s no functionality our various news implementations provided that couldn’t have been shoehorned into tweets. And the savings in coding time and management time, why yes indeed those are decidedly non-trivial. Next time the question of a news feed comes up, you can be sure that this will be the first suggestion we throw out, yes indeed it will.

And as a nice piece of synchronicity with that idea, we just noticed the availability of an open source Twitter client which looks quite well suited to this application:

… This time, we extended the functionality of the Twitter client with (1) a parser for Tweets and (2) the follower list.

The Twitter Parser looks for occurrences of special Tweets, which describe Service requests which occur in Tweetflows. Internally, the Twitter Parser uses regular expressions that describe the patterns which are searched for. If a Tweet matches the regular expression, the result is encapsulated in the TweetParserResult. We trigger the Tweet parser as soon as the delegate method statusesReceived of the Twitter Engine is called…

So there you go, then, save yourself a bunch of effort next time you want to put a news feed in an app!

h/t: @coffeedan, iphonesdk!