Programming Twitter without WCF 3.5

Via Twitter I came across this post showing how easy it is to interface with Twitter using WCF 3.5. 

Dariusz hypothesizes that it would be cool to do

   1: TwitterStatusProxy proxy = new TwitterStatusProxy( "username", "password" );
   2:  
   3: // retrieve friends timeline
   4: XElement timeline = proxy.GetFriendsTimeline();
   5:  
   6: // do whatever you want to do with the data

and proceeds to show how to implement TwitterStatusProxy. All very cool with bindings, channel factories, service contracts and operation contracts.

The only problem I see  is that with only .Net 2.0 the same can be achieved with the following:

   1: WebClient wc = new WebClient();
   2:  
   3: wc.Credentials = new NetworkCredential("username","password");
   4:  
   5: XmlDocument doc = new XmlDocument();
   6:  
   7: doc.Load(wc.OpenRead("http://twitter.com/statuses/friends_timeline.xml"));
   8:  

Seems kind of crazy to pile the whole WCF infrastructure on top of something so simple in the first place. 

No Comments

Add a Comment

comments powered by Disqus