Modernizr and Polyfilling

Recently I have come across a question about the HTML5 feature support by different browsers. How you make sure that the application render properly in non-supporting browsers?

Answer for above question is the proper usage of Modernizr and Polyfilling.

Polifill is a code block that mimics the functionality of an API by providing fallback functionality to older browsers. For example, LocalStorage introduced in HTML5 is not supported in IE7; but we can use a Polifill to implement the LocalStorage support in IE7.

Modernizr is a JavaScript library that detects HTML5 and CSS3 feature supports in user’s browser. Using Modernizr conditional statements, we can define the new features for supporting browsers and another code block for non-supporting browsers.

Modernizr along with Polyfill help the UI developer to address the non-supporting browsers.

Posted in General, HTML5 | Tagged | Leave a comment

Visual Studio 2015: Analyzers

Live Code Analyzers provide live errors and warnings depends on the code analysis rule in the editor itself. It is integrated with NuGet packages, where we can add new rules using NuGet. When we type our code, analyzers start providing recommendations and warning on the code we typed.

We can enable and disable the rule sets and also can set the action for each of the Ruleset. When we create any project using Visual Studio 2015, default Analyzers will get added to the project.


Right click on the Analyzer and select ‘Open Active Rule Set’ to change the rule set settings.


We can activate and deactivate the rules and also set the actions as Warning, Error, Info and so on.


Start typing on the editor and observe the error messages and warning appearing on the Error window.





Posted in Visual Studio 2015 | Tagged , | Leave a comment

Writing TFS Administration Book

Hello All

I have been working with various clients on Team Foundation Server implementations, for a long time. Implementation varies from Version Management to complete DevOps. I have faced many hurdles in my journey; resulted new learning and experience. I have already published an article on the work item customization in Simple-Talk.

TFS Administration involves various facts from installation and configuration till access management and integrations. I have been working on listing down the topics for my new book since few weeks. I have published the topics and the unedited version of the first chapter in LeanPub.

I will be adding more and more chapters to make the TFS Administration book to a complete guide for the TFS Administrators.

Share your thoughts and the topics you are interested to see as part of this book.

Posted in Book, General | Tagged , | 3 Comments

Visual Studio 2015: DNX

DNX or the .NET Execution Runtime is a software development kit and runtime environment that has everything you need to build and run .NET applications for Windows, Mac and Linux. DNX is built for running cross-platform ASP.NET web applications; but it can run other type of applications like console application. When you create an ASP.NET web application using Visual Studio 2015, DNX references will be added by default. This will allow us to develop the web application on Windows and deploy it in Mac system.

DNX not only support the Cross-platform .NET development and deployment, but also support the open source projects. With DNX projects you can easily replace an existing dependency with its source code and let DNX compile it in-memory at runtime.

Posted in Visual Studio 2015 | Tagged | Leave a comment

Visual Studio 2015: C# 6.0 Null-conditional Operator

NullReference exception is one of the main exceptions most of the code blocks return. For handling the same, we will verify most of the object is null or not before accessing the properties or elements of the object.

if (emps != null)
Console.WriteLine(“Number of Employees {0} “, emps.Count());

C# 6 introduced a new operator to handle the null verification. We can re-write the above statement as

Console.WriteLine(“Number of Employees {0} “, emps?.Count());

If the emps object is null, then return null; otherwise return the count of elements. If you want to return 0 in case of null, then the statement looks like

Console.WriteLine(“Number of Employees {0} “, emps?.Count()??0);

We can use the new null-conditional operator with chain statements like

Console.WriteLine(“Order Count {0} “, products?[0].Orders?.Count());

Above statement get the first product, if the products collection is not null and get the count of orders, if there is any orders exists. Otherwise, it returns null.

Posted in C#, Visual Studio 2015 | Tagged , | Leave a comment