PageRenderTime 61ms CodeModel.GetById 28ms RepoModel.GetById 0ms app.codeStats 0ms

/src/Amptools/Public/blogs/michaelherndon/archives/2008_07_13_index.aspx

https://github.com/pvencill/amptools
ASP.NET | 488 lines | 372 code | 116 blank | 0 comment | 30 complexity | b021e4de52dce8e89c9ee8c221ebe717 MD5 | raw file
  1. <%@ Page Title="amptools.net: 07.13.2008" Language="C#" MasterPageFile="~/App/Views/Layouts/Site.Master" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="System.Web.Mvc.ViewPage" %>
  2. <asp:Content ID="Content2" ContentPlaceHolderID="Head" runat="server">
  3. <link href='/Content/default/css/syntax-highlighter.css' rel="stylesheet" type="text/css" />
  4. <link rel="alternate" type="application/rss+xml" title="amptools.net - RSS" href="http://feeds.feedburner.com/amptoolsnet" />
  5. <link rel="service.post" type="application/atom+xml" title="amptools.net - Atom" href="http://www.blogger.com/feeds/7043853799247804655/posts/default" />
  6. <link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://www.blogger.com/rsd.g?blogID=7043853799247804655" />
  7. <style type="text/css">
  8. @import url("http://www.blogger.com/css/blog_controls.css");
  9. @import url("http://www.blogger.com/dyn-css/authorization.css?targetBlogID=7043853799247804655");
  10. </style>
  11. <script type="text/javascript" src="http://www.blogger.com/js/backlink.js"></script>
  12. <script type="text/javascript" src="http://www.blogger.com/js/backlink_control.js"></script>
  13. <script type="text/javascript">var BL_backlinkURL = "http://www.blogger.com/dyn-js/backlink_count.js";var BL_blogId = "7043853799247804655";</script>
  14. </asp:Content>
  15. <asp:Content ID="Content3" ContentPlaceHolderID="Javascript" runat="server">
  16. <script type="text/javascript" src="~/javascripts/prototype.js"></script>
  17. <script type="text/javascript" src="~/javascripts/syntax-highlighter/shCore.js"></script>
  18. <script type="text/javascript" src="~/javascripts/syntax-highlighter/shBrushCSharp.js"></script>
  19. <script type="text/javascript" src="~/javascripts/syntax-highlighter/shBrushRuby.js"></script>
  20. <script type="text/javascript" src="~/javascripts/syntax-highlighter/shBrushJScript.js"></script>
  21. <script type="text/javascript" src="~/javascripts/syntax-highlighter/shBrushCss.js"></script>
  22. <script type="text/javascript" src="~/javascripts/syntax-highlighter/shBrushSql.js"></script>
  23. <script type="text/javascript" src="~/javascripts/syntax-highlighter/shBrushXml.js"></script>
  24. <script type="text/javascript">
  25. //<[CDATA[
  26. dp.SyntaxHighlighter.HighlightAll('code');
  27. //]]>
  28. </script>
  29. </asp:Content>
  30. <asp:Content ID="Content1" ContentPlaceHolderID="main" runat="server">
  31. <div class="left">
  32. <h2 class="silver">
  33. &quot;Working on the complexity that is always indirectly implied by simpilicity.&quot;
  34. </h2>
  35. <h2 class="blog-title"><a name="8164722880411458481"></a>
  36. Using WCF to access the Flickr JSON API
  37. <span class="blog-byline">
  38. by: michael herndon, at: 7/17/2008 06:40:00 AM
  39. </span>
  40. </h2>
  41. <div class="blog-content">
  42. <p>Even though there are quite a few opensource .Net libraries REST API out there, and a really impressive one for Flickr, they tend to never evolve or fork to use the newer framework technologies.&#160; I think its great that they support 1.0, 2.0, and mono, but why not fork and support WCF?&#160; I think part of the problem that .Net 3.5 use is not wide spread as it should be is not only information overload and bad naming for extension libraries, but also lack of opensource support to provide libraries and basis for current technology.&#160; </p> <p>Flickr tends to be a little more tricky to use when calling it than some other REST APIs. WCF is a cool technology, but needs to be massaged when using it with Flickr due to a couple of gotchas and not so obvious things about WCF. In order to use Flickr, you need to register for an api_key and a shared secret code which is used to create an MD5 hash. You also need to create that MD5 each time you call a method, using the url parameters in a certain way. </p> <p>There are also a few not so obvious factors about using the JSON part of Flickr. All of the .Net libraries I've seen so far, use XML. While C# is king of parsing&#160; XML, JSON tends to be more compact, which means less expense over the wire, though it might mean more time parsing once on the developers end point. So there are tradeoffs to using it. </p> <p>When I created the classes needed to use WCF to call Flickr, I have the actual &quot;DataContract&quot; object (DTO, Data Transfer Object), A Hash (Dictionary&lt;string, object&gt;) for adding the parameters to create the MD5 signature, A base class for creating the WCF proxy, a custom &quot;WebContentTypeMapper&quot;, The &quot;ServiceContract&quot; interface, the actual &quot;Client class&quot;, and a mixins class for creating the MD5. </p> <p>Here are some of the gotchas that I ran into while getting WCF to work with Flickr. </p> <p></p> <ol> <li>Flickr makes you create a md5 hash to send with every call for ALL parameters in alphabetical order using your &quot;Shared Secret&quot; Code as part of the md5.&#160;&#160; </li> <li>Flickr's Json response &quot;Content-Type&quot; header is sent not as &quot;application/json&quot; but as &quot;text/plain&quot; which equates to &quot;Raw&quot; in WCF lingo.&#160; </li> <li>The response object is wrapped and not obvious when it comes to json how the DataContract object should be formed.&#160; </li> <li>Flickr will wrap the json response in a javascript function unless you pass in the parameter &quot;nojsoncallback=1&quot; </li> </ol> <p>To get around number one, I created an extension method that takes a Hash (Dictionary&lt;string, object&gt;) and adds method that converts the parameters into a MD5 string. </p> <pre class="code csharp">namespace Amplify.Linq
  43. {
  44. using System;
  45. using System.Collections.Generic;
  46. using System.Linq;
  47. using System.Text;
  48. #if STANDALONE
  49. public class Hash : Dictionary&lt;string, object&gt;
  50. {
  51. }
  52. #endif
  53. }
  54. // different file
  55. namespace Amplify.Linq
  56. {
  57. using System;
  58. using System.Collections.Generic;
  59. using System.Linq;
  60. using System.Security.Cryptography;
  61. using System.Text;
  62. using Amplify.Linq;
  63. public static class Mixins
  64. {
  65. public static string ToMD5(this Hash obj, string secret)
  66. {
  67. var query = from item in obj
  68. orderby item.Key ascending
  69. select item.Key + item.Value.ToString();
  70. StringBuilder builder = new StringBuilder(secret, 2048);
  71. foreach (string item in query)
  72. builder.Append(item);
  73. MD5CryptoServiceProvider crypto = new MD5CryptoServiceProvider();
  74. byte[] bytes = Encoding.UTF8.GetBytes(builder.ToString());
  75. byte[] hashedBytes = crypto.ComputeHash(bytes, 0, bytes.Length);
  76. return BitConverter.ToString(hashedBytes).Replace(&quot;-&quot;, &quot;&quot;).ToLower();
  77. }
  78. }
  79. }</pre>
  80. <p>Well Gotcha number two, took a bit of research to figure it out. The error I got was that it was looking for Json or XML but could not do anything with &quot;Raw&quot;. So the solution is to create a custom binding with a custom WebContentTypeManager. </p>
  81. <pre class="code csharp">namespace Amplify.Flickr
  82. {
  83. using System.ServiceModel;
  84. using System.ServiceModel.Channels;
  85. using System.Runtime.Serialization;
  86. using System.ServiceModel.Web;
  87. public class JsonContentMapper : WebContentTypeMapper
  88. {
  89. public override WebContentFormat GetMessageFormatForContentType(string contentType)
  90. {
  91. return WebContentFormat.Json;
  92. }
  93. }
  94. }
  95. // different file
  96. namespace Amplify.Flickr
  97. {
  98. using System;
  99. using System.Collections.Generic;
  100. using System.Linq;
  101. using System.Text;
  102. using System.ServiceModel;
  103. using System.ServiceModel.Channels;
  104. using System.ServiceModel.Description;
  105. using System.ServiceModel.Web;
  106. using Amplify.Linq;
  107. public class FlickrClient&lt;T&gt;
  108. {
  109. protected string Secret { get; set; }
  110. protected string Key { get; set; }
  111. protected string Token { get; set; }
  112. protected string Url { get; set; }
  113. protected T Proxy { get; set; }
  114. public FlickrClient(string key, string secret)
  115. {
  116. this.Key = key;
  117. this.Secret = secret;
  118. this.Url = &quot;http://api.flickr.com/services/rest&quot;;
  119. this.Proxy = this.InitializeProxy();
  120. }
  121. public FlickrClient(string key, string secret, string token)
  122. :this(key, secret)
  123. {
  124. this.Token = token;
  125. }
  126. protected virtual T InitializeProxy()
  127. {
  128. // using custom wrapper
  129. CustomBinding binding = new CustomBinding(new WebHttpBinding());
  130. WebMessageEncodingBindingElement property = binding.Elements.Find&lt;WebMessageEncodingBindingElement&gt;();
  131. property.ContentTypeMapper = new JsonContentMapper();
  132. ChannelFactory&lt;T&gt; channel = new ChannelFactory&lt;T&gt;(
  133. binding, this.Url);
  134. channel.Endpoint.Behaviors.Add( new WebHttpBehavior());
  135. return channel.CreateChannel();
  136. }
  137. }
  138. }</pre>
  139. <p>The 3rd issue, to know that all objects are wrapped in a &quot;Response&quot; object. To create a DataContract for the getFrob method on flickr, it took looking at the json to see what it was returning. The object below is the basic form of the Json object that is returned, it also includes the properties in case an error object is returned. </p>
  140. <pre class="code csharp"> using System;
  141. using System.Collections.Generic;
  142. using System.Linq;
  143. using System.Text;
  144. using System.Runtime.Serialization;
  145. [DataContract]
  146. public class FrobResponse
  147. {
  148. [DataMember(Name = &quot;frob&quot;)]
  149. public JsonObject Frob { get; set; }
  150. [DataContract(Name = &quot;frob&quot;)]
  151. public class JsonObject
  152. {
  153. [DataMember(Name = &quot;_content&quot;)]
  154. public string Content { get; set; }
  155. }
  156. [DataMember(Name = &quot;stat&quot;)]
  157. public string Status { get; set; }
  158. [DataMember(Name = &quot;code&quot;)]
  159. public int Code { get; set; }
  160. [DataMember(Name = &quot;message&quot;)]
  161. public string Message { get; set; }
  162. }
  163. // different file
  164. using System;
  165. using System.Collections.Generic;
  166. using System.Linq;
  167. using System.Text;
  168. using System.ServiceModel;
  169. using System.ServiceModel.Web;
  170. [ServiceContract]
  171. public interface IAuthClient
  172. {
  173. [OperationContract,
  174. WebInvoke(
  175. UriTemplate = &quot;/?method=flickr.auth.getFrob&amp;format=json&amp;nojsoncallback=1&amp;api_key={key}&amp;api_sig={signature}&quot;,
  176. ResponseFormat = WebMessageFormat.Json,
  177. BodyStyle = WebMessageBodyStyle.Bare)]
  178. FrobResponse GetFrob(string signature, string key);
  179. [OperationContract,
  180. WebInvoke(
  181. UriTemplate = &quot;/?method=flickr.auth.getToken&amp;format=json&amp;nojsoncallback=1&amp;api_key={key}&amp;frob={frob}&amp;api_sig={signature}&quot;,
  182. ResponseFormat = WebMessageFormat.Json,
  183. BodyStyle = WebMessageBodyStyle.WrappedResponse)]
  184. Auth GetToken(string signature, string key, string frob);
  185. }
  186. // the actual client class.
  187. using System;
  188. using System.Collections.Generic;
  189. using System.Linq;
  190. using System.Text;
  191. using Amplify.Linq;
  192. public class AuthClient : FlickrClient&lt;IAuthClient&gt;
  193. {
  194. public AuthClient(string key, string secret)
  195. :base(key, secret)
  196. { }
  197. public AuthClient(string key, string secret, string token)
  198. :base(key, secret, token)
  199. { }
  200. public string GetFrob()
  201. {
  202. string md5 = new Hash() {
  203. {&quot;api_key&quot;, this.Key},
  204. {&quot;format&quot;, &quot;json&quot;},
  205. {&quot;method&quot;, &quot;flickr.auth.getFrob&quot;},
  206. {&quot;nojsoncallback&quot;, 1}
  207. }.ToMD5(this.Secret);
  208. FrobResponse response = this.Proxy.GetFrob(md5, this.Key);
  209. if (response.Code &gt; 0)
  210. throw new Exception(response.Message);
  211. return response.Frob.Content;
  212. }
  213. }</pre> <p class="blogger-labels">Labels: <a rel='tag' href="http://www.amptools.net/labels/Amplify.aspx">Amplify</a>, <a rel='tag' href="http://www.amptools.net/labels/C#.aspx">C#</a>, <a rel='tag' href="http://www.amptools.net/labels/Code.aspx">Code</a>, <a rel='tag' href="http://www.amptools.net/labels/CSharp.aspx">CSharp</a>, <a rel='tag' href="http://www.amptools.net/labels/Flickr.aspx">Flickr</a>, <a rel='tag' href="http://www.amptools.net/labels/JSON.aspx">JSON</a>, <a rel='tag' href="http://www.amptools.net/labels/REST.aspx">REST</a>, <a rel='tag' href="http://www.amptools.net/labels/WCF.aspx">WCF</a></p>
  214. </div>
  215. <div class="blog-footer">
  216. <a class="comment-link" href="http://www.blogger.com/comment.g?blogID=7043853799247804655&postID=8164722880411458481"location.href=http://www.blogger.com/comment.g?blogID=7043853799247804655&postID=8164722880411458481;><span style="text-transform:lowercase">0 Comments</span></a>
  217. <a class="comment-link" href="http://www.amptools.net/2008/07/using-wcf-to-access-flickr-json-api.aspx#links"><span style="text-transform:lowercase">Links to this post</span></a>
  218. <span class="item-action"><a href="http://www.blogger.com/email-post.g?blogID=7043853799247804655&postID=8164722880411458481" title="Email Post"><img class="icon-action" alt="" src="http://www.blogger.com:80/img/icon18_email.gif"/></a></span>
  219. <script type="text/javascript" src="http://w.sharethis.com/widget/?tabs=web%2Cemail&amp;charset=utf-8&amp;services=reddit%2Cdigg%2Cfacebook%2Cmyspace%2Cdelicious%2Cstumbleupon%2Ctechnorati%2Cpropeller%2Cblinklist%2Cmixx%2Cnewsvine%2Cgoogle_bmarks%2Cyahoo_myweb%2Cwindows_live%2Cfurl&amp;style=rotate&amp;publisher=baa2824f-9291-46c0-87b4-6d5a72508a05&amp;headerbg=%23dddddd&amp;inactivebg=%231bb601&amp;inactivefg=%2370eb00%09&amp;linkfg=%231bb601"></script>
  220. </div>
  221. <h2 class="blog-title"><a name="1989566401714559482"></a>
  222. Sample Mixins for HttpRequestBase to use with Asp.Net MVC
  223. <span class="blog-byline">
  224. by: michael herndon, at: 7/16/2008 12:40:00 AM
  225. </span>
  226. </h2>
  227. <div class="blog-content">
  228. <p>Being a semi avid user of rails for my day job, you tend to miss a couple of things that rails has that is not in Asp.Net's MVC framework. It is a great start and the control over the html (minus laziness of whoever ever developed their &quot;Html.DropDownList&quot; extension method, grrr INDENT YOUR NEW LINES!!), is much greater than what webforms gives you. One of the missing things that I miss is the request.xhr?, request.post?, etc methods that end to be helpful when deciding if this is an AJAX call or an actual action call to return the correct page. </p> <p>So how do you determine if the request is an ajax request or just a regular page request. What about enforcing that a page is SSL?&#160; What about doing different things depending if the request is a GET or POST?&#160; </p> <p>So after some googling about headers, rails, and such: here are the first go around of extension methods for HttpRequestBase that should come in handy. </p> <pre class="code csharp">public static class ControllerMixins
  229. {
  230. public static bool IsPost(this HttpRequestBase obj)
  231. {
  232. return obj.Headers[&quot;REQUEST_METHOD&quot;].ToLower() == &quot;post&quot;;
  233. }
  234. public static bool IsGet(this HttpRequestBase obj)
  235. {
  236. return obj.Headers[&quot;REQUEST_METHOD&quot;].ToLower() == &quot;get&quot;;
  237. }
  238. public static bool IsXhr(this HttpRequestBase obj)
  239. {
  240. string value = obj.Headers[&quot;HTTP_X_REQUESTED_WITH&quot;];
  241. return (!string.IsNullOrEmpty(value) &amp;&amp; value.ToLower() == &quot;xmlhttprequest&quot;);
  242. }
  243. public static bool IsSSL(this HttpRequestBase obj)
  244. {
  245. return obj.Headers[&quot;HTTPS&quot;] == &quot;on&quot; ||
  246. obj.Headers[&quot;'HTTP_X_FORWARDED_PROTO'&quot;] == &quot;https&quot;;
  247. }
  248. }</pre> <p class="blogger-labels">Labels: <a rel='tag' href="http://www.amptools.net/labels/Asp.Net.aspx">Asp.Net</a>, <a rel='tag' href="http://www.amptools.net/labels/Asp.Net Mvc.aspx">Asp.Net Mvc</a>, <a rel='tag' href="http://www.amptools.net/labels/C#.aspx">C#</a>, <a rel='tag' href="http://www.amptools.net/labels/Code.aspx">Code</a>, <a rel='tag' href="http://www.amptools.net/labels/CSharp.aspx">CSharp</a>, <a rel='tag' href="http://www.amptools.net/labels/Mixins.aspx">Mixins</a></p>
  249. </div>
  250. <div class="blog-footer">
  251. <a class="comment-link" href="http://www.blogger.com/comment.g?blogID=7043853799247804655&postID=1989566401714559482"location.href=http://www.blogger.com/comment.g?blogID=7043853799247804655&postID=1989566401714559482;><span style="text-transform:lowercase">0 Comments</span></a>
  252. <a class="comment-link" href="http://www.amptools.net/2008/07/sample-mixins-for-httprequestbase-to.aspx#links"><span style="text-transform:lowercase">Links to this post</span></a>
  253. <span class="item-action"><a href="http://www.blogger.com/email-post.g?blogID=7043853799247804655&postID=1989566401714559482" title="Email Post"><img class="icon-action" alt="" src="http://www.blogger.com:80/img/icon18_email.gif"/></a></span>
  254. <script type="text/javascript" src="http://w.sharethis.com/widget/?tabs=web%2Cemail&amp;charset=utf-8&amp;services=reddit%2Cdigg%2Cfacebook%2Cmyspace%2Cdelicious%2Cstumbleupon%2Ctechnorati%2Cpropeller%2Cblinklist%2Cmixx%2Cnewsvine%2Cgoogle_bmarks%2Cyahoo_myweb%2Cwindows_live%2Cfurl&amp;style=rotate&amp;publisher=baa2824f-9291-46c0-87b4-6d5a72508a05&amp;headerbg=%23dddddd&amp;inactivebg=%231bb601&amp;inactivefg=%2370eb00%09&amp;linkfg=%231bb601"></script>
  255. </div>
  256. <h2 class="blog-title"><a name="3907268195622759157"></a>
  257. Amplify&#39;s TwitterN, Yet Another C# Twitter REST API Library
  258. <span class="blog-byline">
  259. by: michael herndon, at: 7/13/2008 03:08:00 PM
  260. </span>
  261. </h2>
  262. <div class="blog-content">
  263. <p><a href="http://code.google.com/p/twittern">http://code.google.com/p/twittern</a></p> <p>I put together a C# twitter library that uses WCF's <a href="http://msdn.microsoft.com/en-us/library/system.runtime.serialization.datacontractattribute.aspx">DataContract</a> &amp; <a href="http://msdn.microsoft.com/en-us/library/system.runtime.serialization.datamemberattribute.aspx">DataMembers</a> and .Net 3.5's <a href="http://msdn.microsoft.com/en-us/library/system.runtime.serialization.json.datacontractjsonserializer.aspx">DataContractJsonSerializer</a>.&#160; Its currently in alpha stage, as I need to finish writing the tests, documentation and make a simple WPF client for twitter.&#160; I needed a twitter library for a personal &quot;secret&quot; project of mine and found that most twitter libraries do not keep up with the twitter API and break when using them. Plus they tend to go to great lengths when parsing the xml.&#160; Unfortunately I do not know if this will work on mono yet. It seems that they have &quot;<a href="http://www.mono-project.com/WCF">Olive</a>&quot;, which is mono's version of WCF and I've seen where they have a path for the &quot;DataContractJsonSerializer&quot;.&#160; If there are any one familiar enough with mono, please by all means use the code, join the project.&#160; </p> <p>One design decision that I made was to use Json rather than xml as its more compact and less data to transfer.&#160; I used WCF because with DataContract &amp; DataMembers you can parse Json and you can name your properties the property way with Pascal Case properties and then tell wcf what attributes of json they represent. This way you don't have properties that look like ruby like &quot;screen_name&quot; or&#160; &quot;profile_sidebar_border_color&quot; in your <a href="http://martinfowler.com/eaaCatalog/dataTransferObject.html">Data Transfer Object</a> in order to deserialize the Json response from twitter. </p> <p>&#160;</p> <p>A basic sample of how to use the library is below. </p> <pre class="code csharp">
  264. using Amplify.Twitter;
  265. using System.Security;
  266. // ... stuff
  267. public void Test()
  268. {
  269. SecureString password = new SecureString();
  270. string temp = "password";
  271. for (var i = 0; i &lt; temp.Length; i++)
  272. password.AppendChar(temp[i]);
  273. password.MakeReadOnly();
  274. Twitter.SetCredentials("Username", password);
  275. StatusService service = Twitter.CreateStatusService();
  276. // or StatusService service = new StatusService("Username", password);
  277. List&lt;Status&gt; tweets = service.GetUserTimeline("MichaelHerndon");
  278. }
  279. </pre> <p class="blogger-labels">Labels: <a rel='tag' href="http://www.amptools.net/labels/Amplify.aspx">Amplify</a>, <a rel='tag' href="http://www.amptools.net/labels/C#.aspx">C#</a>, <a rel='tag' href="http://www.amptools.net/labels/CSharp.aspx">CSharp</a>, <a rel='tag' href="http://www.amptools.net/labels/DataContractJsonSerializer.aspx">DataContractJsonSerializer</a>, <a rel='tag' href="http://www.amptools.net/labels/JSON.aspx">JSON</a>, <a rel='tag' href="http://www.amptools.net/labels/REST.aspx">REST</a>, <a rel='tag' href="http://www.amptools.net/labels/Twitter.aspx">Twitter</a>, <a rel='tag' href="http://www.amptools.net/labels/WCF.aspx">WCF</a></p>
  280. </div>
  281. <div class="blog-footer">
  282. <a class="comment-link" href="http://www.blogger.com/comment.g?blogID=7043853799247804655&postID=3907268195622759157"location.href=http://www.blogger.com/comment.g?blogID=7043853799247804655&postID=3907268195622759157;><span style="text-transform:lowercase">3 Comments</span></a>
  283. <a class="comment-link" href="http://www.amptools.net/2008/07/amplify-twittern-yet-another-c-twitter.aspx#links"><span style="text-transform:lowercase">Links to this post</span></a>
  284. <span class="item-action"><a href="http://www.blogger.com/email-post.g?blogID=7043853799247804655&postID=3907268195622759157" title="Email Post"><img class="icon-action" alt="" src="http://www.blogger.com:80/img/icon18_email.gif"/></a></span>
  285. <script type="text/javascript" src="http://w.sharethis.com/widget/?tabs=web%2Cemail&amp;charset=utf-8&amp;services=reddit%2Cdigg%2Cfacebook%2Cmyspace%2Cdelicious%2Cstumbleupon%2Ctechnorati%2Cpropeller%2Cblinklist%2Cmixx%2Cnewsvine%2Cgoogle_bmarks%2Cyahoo_myweb%2Cwindows_live%2Cfurl&amp;style=rotate&amp;publisher=baa2824f-9291-46c0-87b4-6d5a72508a05&amp;headerbg=%23dddddd&amp;inactivebg=%231bb601&amp;inactivefg=%2370eb00%09&amp;linkfg=%231bb601"></script>
  286. </div>
  287. </div>
  288. <div class="right">
  289. <h3>
  290. Connect
  291. </h3>
  292. <ul>
  293. <li>
  294. <a href="http://www.twitter.com/michaelherndon">
  295. <img src="/content/images/twitter-badge.png" alt="Twitter badge" />
  296. </a>
  297. </li>
  298. <li>
  299. <a href="http://www.facebook.com/profile.php?id=824905532">
  300. <img src="/content/images/facebook-badge.png" alt="Facebook badge" />
  301. </a>
  302. </li>
  303. <li>
  304. <a href="skype:michaelherndon?add">
  305. <img src="http://download.skype.com/share/skypebuttons/buttons/add_green_transparent_118x23.png" alt="Add me to Skype" />
  306. </a>
  307. </li>
  308. </ul>
  309. <h3>
  310. <a href="http://feeds.feedburner.com/amptoolsnet" rel="alternate" type="application/rss+xml">
  311. Subscribe in a reader <img src="http://www.feedburner.com/fb/images/pub/feed-icon32x32.png" style="vertical-align:middle" alt="" />
  312. </a>
  313. </h3>
  314. <ul>
  315. <li>
  316. </li>
  317. <li>
  318. <a href="http://feeds.feedburner.com/amptoolsnet">
  319. <img src="http://feeds.feedburner.com/~fc/amptoolsnet?bg=990066&amp;fg=CCCCCC&amp;anim=0" alt="" />
  320. </a>
  321. </li>
  322. <li>
  323. <a href="http://add.my.yahoo.com/rss?url=http://feeds.feedburner.com/amptoolsnet" title="amptools.net">
  324. <img src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif" alt="" />
  325. </a>
  326. </li>
  327. <li>
  328. <a href="http://fusion.google.com/add?feedurl=http://feeds.feedburner.com/amptoolsnet">
  329. <img src="http://buttons.googlesyndication.com/fusion/add.gif" alt="Add to Google Reader or Homepage"/>
  330. </a>
  331. </li>
  332. <li>
  333. <a href="http://www.pageflakes.com/subscribe.aspx?url=http://feeds.feedburner.com/amptoolsnet" title="Add to Pageflakes">
  334. <img src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif" alt="Add to Pageflakes"/>
  335. </a>
  336. </li>
  337. <li>
  338. <a href="http://www.bloglines.com/sub/http://feeds.feedburner.com/amptoolsnet" title="amptools.net" type="application/rss+xml">
  339. <img src="http://www.bloglines.com/images/sub_modern11.gif" alt="Subscribe in Bloglines" />
  340. </a>
  341. </li>
  342. <li>
  343. <a href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http://feeds.feedburner.com/amptoolsnet" title="amptools.net">
  344. <img src="http://www.newsgator.com/images/ngsub1.gif" alt="Subscribe in NewsGator Online" />
  345. </a>
  346. </li>
  347. </ul>
  348. <h3 class="sidebar-title">
  349. Previous Posts
  350. </h3>
  351. <ul id="recently">
  352. <li><a href="http://www.amptools.net/2008/07/using-wcf-to-access-flickr-json-api.aspx">Using WCF to access the Flickr JSON API</a></li>
  353. <li><a href="http://www.amptools.net/2008/07/sample-mixins-for-httprequestbase-to.aspx">Sample Mixins for HttpRequestBase to use with Asp....</a></li>
  354. <li><a href="http://www.amptools.net/2008/07/amplify-twittern-yet-another-c-twitter.aspx">Amplify&#39;s TwitterN, Yet Another C# Twitter REST AP...</a></li>
  355. <li><a href="http://www.amptools.net/2008/07/determining-developmenttesting-mode-in.aspx">Determining Development/Testing Mode in .Net</a></li>
  356. <li><a href="http://www.amptools.net/2008/06/pursuit-of-rails-like-active-record-for.aspx">Pursuit of Rails like Active Record for C#</a></li>
  357. <li><a href="http://www.amptools.net/2008/04/thoughts-on-developing-linq-to-sql.aspx">Thoughts on Developing a Linq To SQL Layer</a></li>
  358. <li><a href="http://www.amptools.net/2008/04/gallio-mb-unit-3-with-bdd-style-tests-i_05.aspx">Gallio &amp; Mb-Unit 3 With BDD style tests, I mean sp...</a></li>
  359. <li><a href="http://www.amptools.net/2008/04/test-posting.aspx">Simplicity</a></li>
  360. </ul>
  361. <h3 class="sidebar-title">
  362. Archives
  363. </h3>
  364. <ul class="archive-list">
  365. <li><a href="http://www.amptools.net/blogs/michaelherndon/archives/2008_03_30_index.aspx">03.30.2008</a></li>
  366. <li><a href="http://www.amptools.net/blogs/michaelherndon/archives/2008_04_06_index.aspx">04.06.2008</a></li>
  367. <li><a href="http://www.amptools.net/blogs/michaelherndon/archives/2008_06_08_index.aspx">06.08.2008</a></li>
  368. <li><a href="http://www.amptools.net/blogs/michaelherndon/archives/2008_07_06_index.aspx">07.06.2008</a></li>
  369. <li><a href="http://www.amptools.net/blogs/michaelherndon/archives/2008_07_13_index.aspx">07.13.2008</a></li>
  370. </ul>
  371. </div>
  372. </asp:Content>