Showing posts with label Product Review. Show all posts
Showing posts with label Product Review. Show all posts

Saturday, May 17, 2014

NDepend V5: Improvments and New Features


 Improvments and New Features:
      NDepend is improving day by day, and with the release of version (V5) more features and enhancements are onboard. I started using NDepend from last year, and I used it often for improving my development capabilities and coding technique. NDepend makes it easier for you to analyze the code and identifies the lacking areas and give you a brief guide about best practices.

Following are the key features/improvements over previous release:
  • Report Enhancements:  
                With the release of the NDepend V5 the reports are redesigned and trend metric charts are also included in reports. Following are the sections vaialble in the reports:
    • Rules
    • Trend Charts
    • Metrics
    • Dependencies
    • Object Oriented Design
    • API Breaking Changes
    • Code Diff Summary
    • Test and Code Coverage
    • Dead Code
    • Build Order
    • Analysis Log
NDepend Report showing analysis result

  • Dashboard Panel
 Dashboard panel gives a summarized view of the analysis of the code base.
Dashboard Panel (Visual Studio)

Dashboard Panel Showing Rules Summary (Visual NDepend)
Dashboard Panel Showing Trend metric (Visual NDepend)
  • Trend Monitoring
                With NDepend we can create trend charts. Trend charts are made of trend metrics whose values are  logged over time at analysis time. As default some trend metrics are available and it is easy to create your own trend metrics. Trend charts are displayed on the NDepend dashboard. NDepend dashboard shows following default trend charts:
  • Lines of Code
  • Number of Code Rules Violated and number of Code Rules Violations
  • Code Coverage per Tests
  • Max and Average values for various Code Quality Metrics
  • Third-Party UsageTrend charts are displayed on the NDepend dashboard.

Trend charts can be customized and it is easy to create your own trend charts to show default or custom trend metrics.
 
Trend metrics options available in NDepend
Trend metric
  • Support for Visual Studio
             NDepend is fully integrated with visual studio stack. Using visual studio Add-in you can add NDepend support to visual studio, and you are able to see all the reports, trend charts, dashboard, etc in the visual studio. Another option is Visual NDepend UI, using Visual NDepend you can view the analysis results standalone.
Visual studio Add-in options
  • More Recent Rules violation
              With this feature we can compare two different NDepend projects and see the results after comparing with the Baseline project. This feature is useful in order to determine what rules are violated since the last analysis done.
Dashboard showing Recent Rule violation and code differences  found

  • Better Path Management
                  NDepend provides better path management support, following path are supported by NDepend:

                   Absolute : with drive letter C:\ or UNC \\Server\Share format.
                   Relative : to the NDepend project file location.
                   Prefixed with an environment variable with the syntax %ENVVAR%\Dir\
                   Prefixed with a path variable with the syntax $(Variable)\Dir

Path referenced in NDepend and supported paths

  • More Console Options
                Following are the console options available in the NDepend:             
//  NDepend v5.2.1.8320
//  http://www.NDepend.com
//  support@NDepend.com
//  Copyright (C) Patrick Smacchia 2004-2014
//  All Rights Reserved
//

NDepend accepts these arguments:
 
  /ViewReport                 to view the HTML report

  /Silent                     to disable output on console

  /HideConsole                to hide the console window

  /Concurrent                 to parallelize analysis execution
 
  /LogTrendMetrics            to force log trend metrics
 
 /TrendStoreDir              to override the trend store directory specified in the NDepend project file.

  /PersistHistoricAnalysisResult   to force persist historic analysis result

  /HistoricAnalysisResultsDir to override the historic analysis results directory specified in the NDepend project file.

  /OutDir dir                 to override the output directory specified in the NDepend project file.

  /XslForReport xlsFilePath   to provide your own Xsl file used to build report

  /InDirs [/KeepProjectInDirs] dir1 [dir2 ...]
                              to override input directories specified in the NDepend project file.

  /CoverageFiles [/KeepProjectCoverageFiles] file1 [file2 ...]
                              to override input coverage files specified in the NDepend project file.

  /PathVariables Name1 Value1 [Name2 Value2 ...]
                              to override the values of one or several NDepend project path variables, or
                              create new path variables.

  /AnalysisResultToCompareWith
                              to provide a previous analysis result to compare with.

  /Help                       to display the current help on console
 









Saturday, May 25, 2013

NDepend V4: A Product Review

About NDepend:   
This is the first time since beginning of my career, that I am using tool for measuring the application. NDepend is unique and innovative tool which predicts about the application and states the factors that are critical to well developed software application, and shows results in a graphical manner. It incorporates several Code Metrics, Standard and Custom Rules that are checked upon analyzing the application, and suggests the lacking area in terms of Software Quality.

    NDepend offers variety of features notably some of them are Code Metrics, Dependency Matrix and Graph, Code Difference, Code Coverage, Metrics for OOAD semantics and many more other attributes in the stack. It is fully integrated with Visual Studio and is readily available for developers as a Visual Studio AddIn. Basically, it iterates through the product metadata and gathers the statistics about the application and recommends possible remedial action for the better coded application, and highlights dark sides of an application that needs attention, which is usually overlooked by many of software developers.

Main Functions:
1). Analysing VS.Net Solution and VSNet Projects
2). Analysing .Net Assemblies in a Folder
3). Analysing a Set of .Net Assemblies

Features:
             1. NDepend Class Browser

                   It provides the Class Hierarchy feature as a tree view from .Net assembly.

Abstraction Vs Intsability


Class Browser 
               2. NDepend  Search
     Using search feature  you can find  method by name, by Full Name or by using CQLinq query. This feature is not limited to Name, you can search by size, complexity, coupling etc also. Also you can search for the difference between two snapshots of your code.
Search


            3. Queries and Rule Explorer and Editor
     It provides with capability of viewing and editing the Query and Critical rules that must not be violated. For this CQLinq (Code Query LINQ) provides a way to query .Net code, and helps you in fulfilling your custom queries.
Queries and Rule Editor
For instance you can query methods which has LOC(Line of Codes) more than 30 by using simple syntax:
            from m in Methods where m.NbLinesOfCode > 30 select m
Also Queries and Rules Summary explorer panel shows the highlight of the number of rules satisfied and violated.

Queries and Rule Explorer

             4. Dependency Matrix
     It represents the dependencies between the software components within the software application.

Dependency Diagram

Dependency Matrix


Dependency Matrix

             5. Dependency Graph
     It represents the relationship between the .Net assemblies used in the software application. In addition to Dependency Graph different graphs are available to visually support the developer such as: Call Graph, Class Inheritance Graph, Coupling Graph, Path Graph, Cycle Graph etc.
Dependency Graph

6. Metrics
     Several metrics are already available to assist you in dealing with development of Quality software application. These metrics are applied at various levels from .Net Application, Namespaces, Types, Method to field level, in order to provide you full control on each aspect of software.
Metrics - Type Level

Metrics - Method Level

Metrics - Namespace Level
Conclusion:
     As I stated in the beginning I have never used tool for measuring Application, but after using NDepend I personally feeling good and found it more useful. Now I am able to able to analyze my code in better way to maintain standards in developing software applications. My experience with Ndepend is good, though I have explained some of the features, I still would like to advise everyone out there to take a chance to evaluate NDepend (http://www.ndepend.com/NDependDownload.aspx).