As an academic assignement, we were asked to analyse the architecture of the Google Protobuf open source project. Protobuf is the communication protocol used by Google to communicate between processes (see the official site). The project also comes with compilers to generate access classes for many languages live Java, Ruby, C#, etc. Being a .Net developer for years, it was natural for me and my teammate to focus on the C# library of Protobuf. To analyse the architecture of the C# module, we used a really nice tool, NDepend. NDepend is a sophisticated analytic tool for .Net projects that give a lot of informations about code architecture and code quality.
What have we found
Using the different graphs provided by NDepend, we were able to find some really interesting facts :
- The abstraction level of the code is pretty good (see graph 1)
- The authors have been able to manage dependencies pretty well, having only 2 cross-referencing between namespaces (there's only one assembly in the core project) (see graph 2).
This is really interesting informations and there's many more available in the tool but what NDepend was the most usefull for us is to quickly analyse the architecture and be able to see that it's, in fact pretty simple (see graph 3)
My experience with the tool was good and I plan to continue using it during the remaining classes of my master degree. I'll most certainely pass the information to my employer because there's a lot in that product to improve the quality of our softwares.
Give it a try and thanks NDepend for such a quality product.
Graph1
Graph 2
Graph 3