Posts

Showing posts from 2016

Building Simple Website - Angular 2

http://onehungrymind.com/build-a-simple-website-with-angular-2/

Render rows as columns AngularJs

The best & minimal data chopping approach to render rows as columns - http://code.notsoclever.cc/column-and-row-based-tables-in-angularjs/ Working JsFiddle - https://jsfiddle.net/vpavulu/rxrox8nt/ using ng-repeat/ng-switch - https://jsfiddle.net/vpavulu/s358y77t/

Create common controls as Angular Directive (Dropdown / select list)

You can create state/country dropdown list as common controls to make use of them as global controls instead of re-creating for each controller. http://plnkr.co/edit/V5ub3CBRMlQcjGMs2Px2?p=preview Ref:  http://stackoverflow.com/questions/18459681/how-add-options-to-a-select-with-an-angularjs-directive For Two-way binding working from/to directive, need to use controller in directive instead of link function. Fiddle -  https://jsfiddle.net/vpavulu/h2ng6wdw Another way to make 2-way binding to work with Button & Unordered list as dropdown list - http://plnkr.co/edit/mIKHqMixUALMR8DA18Vh

Static content, java script, css, png, image files not rendering

http://stackoverflow.com/questions/10512053/css-images-js-not-loading-in-iis

Static Methods Unit test by MOQ

Today I got pulled into one of the existing project and it had data layer with all static methods and its tightly coupled with service layer. I had to write unit test by using Moq framework for one of service method call and it had 5 different db layer method dependencies. Unfortunately Moq doesn't support to mock static methods directly. Moq is meant to mock Interfaces not concrete methods. Fortunately explicit interface implementation helped to achieve to write unit tests. I have followed below article and helped to write some unit tests for service layer. Ref -  https://guptaashish.com/2012/10/17/unit-testing-a-static-method-which-calls-another-static-method/#comments

How to write Unit testable code?

The below article may be older, but it gives how to start your classes to make more unit testable. http://www.asp.net/mvc/overview/older-versions-1/contact-manager/iteration-4-make-the- application-loosely-coupled-cs http://web.archive.org/web/20150318150744/http://www.remondo.net/repository-pattern-example-csharp/

React JS tutorial Videos

https://www.youtube.com/playlist?list=PLoYCgNOIyGABj2GQSlDRjgvXtqfDxKm5b