CCNet Plugin And Dependency Injection (IoC)
I´ve been quiet, I know. that is mainly due to lack of time really. I have several posts on queue waiting to make their appearance here.
But since I find one of them to be more urgent I´d really like to write it before the queue. Sort of a LIFO, if you know what I mean.
So I´ll tell you guys what I´ve been up to. I´m building 3 CCNet Plug-ins and a new Dashboard.
"WOOT??!?!? What´s wrong with the current dashboard?"
A New Dashboard
Nothing at all. It´s really very nice, but I want to make a few changes to it, like using more user-friendly libraries like Ext and JQuery. I want to make information easier to find and a lot of changes like that (actually not changing the information it displays). But none of those would have motivated me to the task. What motivated me is that I want to include the build information in my portal. Yes I know that I could use RSS for it, but I want more. I want to display a list of builds that when clicked show a dialog containing information for the build (all coming from the dashboard) via Ajax. Once I have more information I´ll share with you!
BuildBreakingChanges Plugin
This is a very interesting plug-in and I´m actually 70-80% done on it. Instead of explaining what it does I´ll show the report it produces:
Build Date: 10/Nov/2007
Comparison between: 0.1.0 and 0.1.1
Warning: This build contains breaking changes. Caution is Advised!
Assembly MyTest
Additions:
public class MyClass added in namespace MyTest.MyNamespace.
public class MyClass2 added in namespace MyTest.MyNamespace.
Class MyClass in namespace MyTest.MyNamespace
public void AddNumbers(string test) added
Interface IMyInterface in namespace MyTest.MyNamespace
int Sum(int a, int b);
Removals:
public class MyClass3 removed from namespace MyTest.MyNamespace.
...
And so on, and so forth. You got my point right? This is a report that tells you if the public interface on your analyzed assemblies were broken since the last build.
You´ll be able to present the name of the classes, interfaces, etc in C# or VB.Net, but since I use Dependency Injection for pretty much everything in this beast, you can easily inject your own language of choice.
Once this plug-in is done I´ll give more detail.
Text Enforcer Plug-In
As you can see here, we at the Stormwind Project are required to include the license header in all files that go into that codebase.
But even us the committers forget about this some times. So how can we ensure that we´ll always include the license in all files. Here enters the Text Enforcer Plug-In.
Say I create a file called License.txt in my project and place the licensing text for Stormwind Project there. Then I tell NAnt to verify that all files contained in the FileSet below contain the text in the license file:
<fileset>
<include name="**/*.cs" />
</fileset>
This way I´ll get a nice report in CCNet telling me what are the offender classes, and we can easily fix them by including the licensing text.
The main usage for us is the licensing part, but since the plug-in is generic, you could check for any given text. Hopefully this will be useful to others.
I´ll start this plug-in once I finish BuildBreakingChanges.
Code Churn Plug-In
Well, this is actually the only thing I miss from TFS in CCNet. But this is about to change. I´ll build a Plug-In that analyzes Code Churn as described here.
The idea for this plug-in is to enable this kind of analysis:
In this chart you can clearly see that around version 1.0.0 someone did a lot of refactoring (about 20% of all the changes in the analyzed period) and the coverage dropped from around 80% to around 40%. This probably means that I´ve inserted a lot of untested code in my codebase.
I believe this chart to be an invaluable tool in tracking how much effort you place in each iteration of your project.
This is the last of the three, since it´s by far the hardest to build.
Stormwind Project Sponsors
I can´t help but mention that Stormwind Project got four new sponsors. Once more they are all heavy-weight in the development industry.
First we got a free open-source license from Simian. If you don´t know Simian, go to http://buildserver.stormwindproject.org and check out the report it outputs. It´s practically as if you´re looking at the "refactoring points" in your code.
Second we got four open-source licenses from NDepend so that we can use this kick-ass product to analyze the dependencies, quality and a whole lot of other interesting aspects of our projects. You can check it as well in http://buildserver.stormwindproject.org.
Third we got a free open-source license from NCover so that we can get an accurate report on the amount of code coverage in our projects. We can only thank immensely since this is a very important indicator for us. At present this plug-in is not configured in the build server (it is configured but not working, didn´t have time to figure it out yet).
Last but not least we got a free open-source license from Resharper. I can´t even begin to describe how cool this is. Resharper is an invaluable tool if you want to be productive. Do yourself a favor and start using it, even if a trial. I promise you won´t look back.
As you can see, some major players in the community are trusting our efforts to be true. We hope not to disappoint them as well as the open source community. Thanks for being a HELLUVA community!
Conclusion
As you can see I´m pretty busy. On top of all that work there is the Stormwind Project Community portal, and the build server that take quite a slice of my time. I´ll try my best to come with some alpha soon so I can start to gather feedback early.
Anyway I´d really like to know some opinions! Are those plug-ins useful? Which one interests you the most? What would you change? I am an idiot and there are already such things implemented? Please feedback my fellow readers! Help me out here!
#127