About |
About |
So we decided to change this and started to make development for SharePoint easier with the SharePoint Software Factory. SPSF contains lots of templates and recipes to automate the creation of SharePoint code. It helps to improve speed in development and helps to develop code according to SharePoint best practices. It helps newbies to learn SharePoint development faster and project managers and architects to reach a higher level of code quality in their team. It contains project templates which support the Team Foundation Server Team Build and therefore enable the first step of ALM for SharePoint.
Next critical step in SharePoint development was the deployment of the custom solutions. So we integrated the automation of the deployment process into the SharePoint Software Factory, with configurable XML scripts and MSBuild. After SharePoint 2010 shifted from STSADM/SSOM to PowerShell, we decided to rebuild the deployment scripts from scratch based on Powershell and made it also available as the separate SharePoint Solution Deployer project on Codeplex at.
Now SharePoint development became easier for the developers and the deployment process became stable, reproducable and highly automated. But one piece was missing all the time: the code quality checks. Nobody was able to check the correctness of SharePoint code and conformance to best practices. Errors in the XML code (like typos or more critical errors) could only be found during runtime after deployment. This usually costs time and money and nervs. Unfortunately existing tools like FxCop or others are not able to check the XML part of SharePoint code or any SharePoint specific practices.
So we started to develop SPCop: A tool to analyze SharePoint solution packages (.wsp) including assemblies and XML code. We ended up with more than 300 rules which can check custom SharePoint code for correctness, best practices, design, naming, supportability etc. SPCop is available as extension for Visual Studio, as command line tool or a build activity for your Team Build in TFS. And SPCop provides a SDK to create your own rules.
But this was not the end. Our approach of extracting SharePoint WSP solutions and making them analyzable opened new opportunities: with all the SharePoint code in our hands we were also able to analyze all dependencies between SharePoint elements like FeatureActivation dependencies, referenced images, referenced Fields in ContentTypes. We were able to calculate Code Metrics e.g. Number of features in the code. And we were able to create an inventory of all code in WSP solution packages. The dream for every SharePoint code reviewer, architect and administrator.
So, today the SharePoint Code Analysis Framework (SPCAF) is the home of these new SharePoint code analysis tools:
And now comes the best: SPCop is available for free and can be used by every developer. Download SPCop in Visual Studio Gallery.
comments powered by Disqus
Copyright © 2013 RENCORE AB. All Rights Reserved
Disclaimer: The views and opinions expressed in this documentation and in SPCAF are those of the creators and do not necessarily reflect the opinions and recommendations of Microsoft or any member of Microsoft. All trademarks, service marks, collective marks, copyrights, registered names, and marks used or cited by this documentation are the property of their respective owners. SharePoint Code Analysis Framework, Version 4.5.2.7855, see www.spcaf.com for more information |