Status 2010-02-14

Feb 15, 2010 at 8:03 AM

This project has seriously expanded. It has much more than just a class library for generating TwiML.

The first issue that I encountered was that I wanted to programmatically kick off a connection to Twilio, just to get it to come back to my server for TwiML.

  • I took a look at the C# REST code provided by Twilio, but it's really tiny and not much of a library. I wanted something more robust.
  • I also looked at the Twilio WCF REST Client Library. While that project actually inspired this one, I had immediate problems with it.
    • The configuration file for the project is missing (I filed an item in the Issue Tracker).
    • There are other bugs in the code (I filed one item for PhoneCall.cs so far, not for others).
    • More importantly, that project relies on WCF and the WCF REST Starter Kit. I have nothing against WCF, and appreciate that it's intended to simplify development. I also understand that the WCF REST Starter Kit is further intended to simplify development. But it's my opinion that all of this "simplification" comes at a tremendous cost of time and increased complexity. The learning curve is huge for someone to understand WCF, the Microsoft.Http libraries, and everything related. My goal with this project is to help developers to communicate with Twilio, but I don't want to do so with added framework tiers that can make the code incomprehensible to the average developer.
    • Finally, and most importantly really : It doesn't look like that client library is being maintained. That author/developer doesn't respond to notes posted to his project. He doesn't participate in any other CodePlex projects anymore. His website is inaccessible. It looks like he's lost interest in what's still a "Beta" project. These are all bad signs.

Rather than rely on someone else's code to kick off my code, I decided to write a new REST client library and add it into this TwiML server library. This creates a real identity crisis for this project which has been named the Twilio Server Library for .NET (TSL.NET). I may change the project name at some point - or we'll just live with the anomaly.

So what is this new REST client library? I wanted to build on the fine work done by Interscape Technologies. But I can't contribute to that project and recommend that people go there. I also didn't want to deal with WCF. I decided to merge the Interscape Technologies Twilio WCF REST Client Library into my Twilio Server Library. I stripped out the WCF but needed to replace it with something stable, standard, and extensible. I'm a big fan of, a service in the same SaaS class as Twilio. They also publish an API, and a C# library to implement it. That library has a very good HTTP client subcomponent that does exactly what's required here: building RESTful URLs, returning XML, and populating classes with the XML data. So at this point, this library is now a melding of all three of these projects.

In case anyone is wondering:

  • All three libraries are open source and published under similar licenses with no contradiction in their terms.
  • The source for TSL.NET includes the licenses for each library, references to the original sources.
  • Proper attribution is given to all authors, as well as full gratitude for publishing their code under terms that allow TSL.NET to blossom.


I have successfully completed REST tests for things like retrieving an account, retrieving CallerIDs, retrieving Calls, etc. I have also made calls which then come back to hit some basic TwiML generated from the library. So this is already an end-to-end SDK for C# developers ... and that's what I was looking for when I started all of this. ;)

I need to complete a number of functions and do more testing before publishing the 0.1 Beta but I expect to do that within the next couple of weeks.

In another Discussion posting I'll explain more about how the library was used here. And some time soon I'll provide more examples about how this library can be used.