Creating High Performance Redis based Analytics for .NET Applications

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.

Turbolinks in ASP.NET MVC

I just created a new nuget package that integrates Turbolinks with ASP.NET MVC application. In case you don’t know what Turbolinks is, it comes as default in Rails 4 and the latest basecamp uses it extensively. Turbolinks uses ajax and the history api to boost page performance and gives users a smooth ux. Integrating it with ASP.NET MVC is trivial, once you install the nuget package, add the script file into your layout page, there is no dependency on any other external scripts, it works even without jQuery. Next, register the Turbolinks action filter in GlobalFilterCollection, you may also decorate it with selective controllers and actions instead of registering it globally. Behind the scene, turbolinks captures all of the anchor’s click and uses ajax to load the page, once loaded it replaces the current page body and title with the new, verifies the script and stylesheet changes and finally uses the history api so that the browser back behavior remains the same as regular server side page.

Implementing User Confirmation and Password Reset with One ASP.NET Identity – Pain or Pleasure

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.

Meet TextUml – A Real-time Application Developed with Signalr and Backbone.js

Its been quite a while that I have shared a complete application implementation with my peers, so here is it TextUml, it is still in very early stage and in terms of features it draws uml sequence diagram from your input and you can share the document with multiple users who can participate in collaborative editing.  There are few more features that are still under development, so keep an eye on upcoming releases. Behind the scene TextUml is developed with Backbone.js in CoffeeScript, it uses Require.js for modularization, KineticJS for html5 canvas drawing,  Mocha, Chai and Sinon for client side testing. The server side uses all the latest beta of ASP.NET MVC, ASP.NET WebAPI and Signalr. If you are new to Single Page Application in Microsoft space, the TextUml can serve as good reference application for your learning. The complete source is released under MIT License and available in Github

Enjoy and do let me know your feedbacks!

Create AngularJS Directives to Remove Duplicate Codes in Form

In my recent post I presented few form templates which was full of duplicate codes. In this post, I will show you how to harness the power of AngularJS Directives to create small reusable code snippets that share common behaviors and avoid duplication. AngularJS Directives probably the most complicated thing in the whole angular framework, there are quite a few things that you need to understand like compiling, linking, nested scoping, transclusion etc.. in order to master it. But in the case, we are going to create few basic directives which does not require an angular expert to understand it. But before it, lets see the original version of the markup where it was full of duplication: