About - SPCAF

About

How SPCAF came to be...

The developers and architects at Rencore have been creating applications on the SharePoint platform as project managers, architects or developers for many years.

From the start we were facing several challenges in SharePoint development:

  • Missing automation in the deployment process.
  • Tons of XML code for SharePoint elements.
  • A Huge number of different technologies, languages and frameworks.
  • Developing by "copy & paste".
  • Missing code quality checks.
  • Missing guidance and best practices.

So we decided to change this with the mission to make SharePoint development easier. This was the birth of the OpenSource project 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.

The 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 rebuild the deployment scripts from scratch based on PowerShell and which are available OpenSource as SharePoint Solution Deployer. SPSD standardizes and automates the entire deployment of SharePoint farm solutions, including pre-requisite checks, custom deployment actions and extensibility with custom plugins e.g. in order to create a site structure.

Now SharePoint development became easier for the developers and the deployment process became stable, reproducible and highly automated. But one piece was always missing: the code quality checks.
Nobody was able to check the correctness of SharePoint code and conformance to the 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 nerves. 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 800 rules that can check custom SharePoint code for correctness, best practices, design, naming, supportability etc. SPCop is available as an extension for Visual Studio, as command line tool or a build activity for your Team Build in TFS. Even better, SPCop provides an 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.

Further, with the shift to the SharePoint app development model in SharePoint 2013 and Office365, many veteran SharePoint developers suddenly have to throw away all they know about full trust code and have to learn to code with JavaScript, JSOM, MVC5, Angualr.js, Knockout.js and many more. Not only do the face now the same problems which thought have been solved with SPCop, but also have to migrate their suddenly "old" SharePoint farm solutions to apps. Hence, we also integrated app code analysis as well as migration analysis into our toolset.

Today the SharePoint Code Analysis Framework (SPCAF) is the home of collection of SharePoint code analysis tools:

  • SPCop for validation of more than 800 rules.
  • SPDepend for the creation of dependency graph.
  • SPMetrics for calculation of SharePoint code metrics.
  • SPInventory for a creation of a code inventory.
  • Migration Assessment to provide guidance how to migrate your SharePoint farm solution to the App model.

SPCAF and SPCop are now considered as an industry standard for SharePoint code quality analysis by SharePoint developers throughout the world.
If you are still not convinced then check out the Office Dev Center where Microsoft recommends SPCAF for code analysis and migration to the App model.
Our close collaboration with Microsoft allows us to integrate the latest guidance and practices directly in SPCAF.

Get your free trial of SPCAF today!

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.