October 24, 2014

Software Quality Assurance (QA) and NDepend

Background:

Software quality is not limited to testing for strong validations, security and vulnerabilities but also depends upon its architecture, coding standards, and defined business logics.

Quality assurance (QA) generally does by separate quality team in software industries and qualifies it after validations, security, vulnerabilities and performance testing. Testers do not have any idea about coding standards and business structures used behind the scene. Now the question arises, if coding guidelines and business structure are not defined properly then does the software will be really a quality product?

Object oriented (OO) concepts are not a piece of cake. Understanding, coding and managing software program in object oriented paradigm (OOPs) is really a big challenge in software development.

Consider you are the lead of a project and numbers of programmers are programming. Your assigned project is really big, then how you will assure about its quality in terms of coding standard, unless you do not have thorough knowledge about written codes? Second thing, is it an easy task for you to review entire project code lines and to decide whether the implemented concepts are write or wrong? Where the programmers have violated the rules? What could be the best approach? To find the variables defined but never been used? What are the dead codes? Rules violated, project dependencies, third party DLL(s) used in it? Not limited to these only, but numerous of similar challenges comes while handling large projects, because you can never assume all the programmers have same understandings.

Before, to overcome these problems, you need to do hard work to review and find all code logic written in assemblies or in project scope. But now a day’s tools are available in market those can really make your task easy and accurate.



NDepend: Your project review partner.

One of the tools I discovered is NDepend. This tool finds all the dependencies, assemblies used in project, reviews the code lines, classes & OOPs methodologies implemented and finally gives you a visual report from where you can easily monitor and track the limitations as well rules violated in your class libraries. Nevertheless, it has a user friendly dashboard which shows graphical representations of entire code activities, dependencies, code rules, rules violated, types, percentage of comment lines, third party tools used and similar.



October 16, 2014

Error: The type or namespace name 'Ajax' does not exist in the namespace System.Web.Mvc

ASP.Net MVC ERROR: The type or namespace name 'Ajax' does not exist in the namespace 'System.Web.Mvc' (are you missing an assembly reference?)


Solution:

Right click on respective referenced .dll, go to 'Properties', set property Copy Local = True, and then rebuild.

Error: Entity framework "Cannot convert from 'System.Data.Objects.ObjectParameter' to 'System.Data.Entity.Core.Objects.ObjectParameter"

Entity Framework ERROR: Cannot convert from 'System.Data.Objects.ObjectParameter' to 'System.Data.Entity.Core.Objects.ObjectParameter[]' entity framework 6


This is one of most frequent compile time error you may face in Entity Framework. This is because either of:

1. Version conflict or
2. Namespace used.


By default, while compiling project, framework includes namespace using System.Data.Objects;


Solution:

To fix this issue:

If version conflicts, install package for respective version of EF.

If version is same, change the above namespace to System.Data.Entity.Core.Objects