WPF Code Analysis on VSTS

Code Analysis is the analysis of computer software that is performed without actually executing programs built from that software. There are two types of code analysis, dynamic and static. Simply stated

Managed code like C# or Visual Basic is compiled into intermediate language called MSIL (Microsoft Intermediate Language). This MSIL can be analyzed both static and dynamic.

Static analysis is a code review based on some rules, which have goals such as.

  • Code compliance to companywide standard or standard like OOP
  • Identify (potential) bugs in code
  • Identify design and implementation problems
  • Peer education in a development team

Dynamic analysis is a code review based on benchmarking or profiling when the code is executed, this approach is good when we want to.

  • Identify the scalability of the application
  • Identify load balancing of the application
  • Identify performance bottle necks
  • Identify the stability of the application

In some complex applications such as Windows Presentation Foundations or ASP.NET Web Applications we can do little checkpoints for static analysis. There are.

  • Design Analysis, focused in object oriented implementation such as how developer initialize variable, how developer create class, as well as how the variable is finalized.
  • Interoperability Analysis, focused in relations between application and external system, such a COM+ component, .NET remoting, as well as message queuing.
  • Maintainability Analysis focused in how "clean" the code with the other code.
  • Portability Analysis focused in independence the code, especially the business tiers, in examples only use P/Invoke that portable enough or used only targeted frameworks when developing the solutions
  • Naming rules, focused in the naming conventions in language
  • Performance rules, focused in best practices code that can give performance impacts, such as eliminate unused variable, array best practices, as well as
  • Security rules, focused in some of coding practices that can be implemented for better security

If you want to try static analysis just download FxCop , for better integrations with WPF and others projects template, you can use VSTS. VSTS has a lot of static analysis... and you can create your policy if you need to

Share this post: | | | |

Comments

No Comments