Sonargraph Product Family

Sonargraph-Architect

Sonargraph-Architect is a general purpose static analysis tool and can be best described as the swiss army knife for architects, quality analysts and developers. It is also a very powerful tool in the hands of a capable software craftsman. Currently it supports C#, C/C++ and Java. More languages will be supported in the future. It incudes all the features of Sonargraph-Explorer and adds automated architecture checks based on a powerful DSL, a Groovy based scripting engine, a checker for duplicate code, virtual refactorings, issue resolution workflow, advanced metrics like LCOM4 and a break up computer for cyclic dependencies.

Architecture as Code: Design your Architecture using Sonargraph's Architecture DSL

use our powerful and easy to learn and understand software architecture DSL to describe the architecture of your system. Read our blog article "How to organize your code" to learn more.

Architecture

Virtual Refactorings allow the Simulation of Refactorings without touching the Code

With a virtual refactoring you can delete, move or rename certain elements without actually changing your code. Sonargraph will simulate the effect of those refactorings for you. If you are happy with the results just excute those refactorings in the real world by using your IDE. This is much safer than experimenting with refactorings in your IDE because you can actually see, how your refactorings will impact the architecture and dependency structure of your code.

Break up cyclic Dependencies with minimal Effort

Our cycle break-up computer helps you to identify the dependencies you need to cut to untangle cyclic dependencies with the smallest possible effort. You can then fine tune the result set according to your architectural requirements.

Breakup

Assess Quality by Analyzing Metrics and Code Structure

The screenshot below shows the overall system metrics of NHibernate (C#) including the associated test projects.

Metrics

Sonargraph-Architect computes hundreds of code and quality metrics that can be used to quickly assess the technical quality of any software system. Moreover it is easily possible to define you own metrics by writing a simple Groovy script. The script below computes the percentage of scource files with more than 300 lines of code on the level of modules. The threshold is set to 10%.


  IScriptVisitor v = coreSystem.createVisitor()
  def id = coreSystem.getOrCreateMetricId("LongSourcePercent",
        "Long Source Files (%)", "Percentage of source files with more than 300 LoC",
        true, 0, 10)  // Threshold between 0 and 10
  def fileCounter = 0
  def longFileCounter = 0

  v.onSourceFile
  {
      SourceFileAccess sf ->

      def loc = sf.getLinesOfCodeMetric()

      if (loc >= 300)
      longFileCounter++
      fileCounter++
  }

  v.onModule
  {
      ModuleAccess module ->

      println "Visiting ${module.name}" // goes to a console view
      visitor.visitChildren(module)     // visit source files in module
      if (fileCounter > 0)
      {
          double value = 100.0f * ((float) longFileCounter)/fileCounter
          result.addMetricValue(id, module, value)
          println "  ${module.name}: ${value}"
          fileCounter = 0
          longFileCounter = 0
      }
  }

  coreSystem.visitParserModel(v)

Using dependency visualization and metrics it becomes easy to gain a better understanding of any software system, even if it lacks documentation. Moreover the metrics allow a quick and solid assessment of the technical quality of the codebase.

Quality assessments can be performed remotely by using a snapshot file generated by Sonargraph-Architect on a development machine. If the user creating the snapshot permits the snapshot will not only hold a complete model of the software system, but also all of the source code. The remote machine does not need a development environment.

Find Duplicated Code Blocks

Sonargraph-Architect comes with a powerful duplicate code detection algorithm. This makes it easy to detect code sequences created by copy & paste. The duplicate code viewer is able to conveniently display duplicated blocks side by side.

Dupview

Manage Issues

All issues detected by Sonargraph-Architect are displayed in the issues view. Issues can be filtered, ignored or converted into tasks. Ignoring issues is useful for any issue that you do not plan to fix in the near future.

Create Your Own Code Checkers

You can use Groovy Script to check for specific issues in the code. The script in the screenshot below detects all uses of sub classes from their super classes. This is considered to be bad practice. You can configure the script to run automatically with each refresh. The issues detected by the script will then show up in the issues view.

Scriptview

Ready to try Sonargraph-Architect? Here is what you need to do:

  • Register now! As a registered user you can download and test Sonargraph-Architect for free.
  • After you are registered and logged in you can download and install Sonargraph-Architect. Then you should request a free 14 day evaluation license, that allows you to test the full product on any Java, C# or C/C++ project.