Recently working on exception and logging in a Ruby project I came across a nice gem called Minuteman which uses Redis bitmap to track user activity, further investigation shows that Redis can be used to track other metrics of your application very efficiently as well, last weekend I started to port in C# and thus Minuteman .NET version was born and nuget package is also available. Behind the scene it uses StackExchange’s BookSleeve as a Redis Client and as an added feature I have also utilized Redis built-in pubsub so that Signalr can be used to report real time update.
Recently, I was trying to introduce GitHub and Twitter login for my TextUml, it was using the simple membership which has out of the box support for Twitter login, my attempt to create a client for GitHub OAuth2 failed, it seems the
OAuthWebSecurity was receiving different query string name for provider from GitHub, anyway I did not want to invest too much time as Microsoft is coming up with a new Membership system called ASP.NET Identity (also the default in ASP.NET MVC 5) and I want to give it a try as the server side of TextUml is already running on all the edge versions of different packages.
I managed some time to stab the new ASP.NET WebAPI, I have developed few Http API in the past solely on ASP.NET MVC instead of going through the WCF route. My goal was to check how much work I can delegate it to the new WebAPI instead of doing it myself. No, I am not going to show you some CRUD controller that does the basic stuffs, I take it for granted. Instead, I would show you something that is more realistic. The example that I am going to present a Contact resource that has id, first name, last name and a collection of associated addressed, still pretty basic stuff.
Recently I was trying intermixing the new .net 4 dynamic object with the regular object, the idea is to add dynamic properties in regular object, the regular object may have some predefined properties and additional properties can be added at runtime, before the release of dynamic object we usually handle these kind of cases with the
dictionary. With the new dynamic object, your regular object can directly inherit from the
DynamicObject to achieve this, but I want to keep my class hierarchy clean, so I created a new interface that inherits from