SlideShare a Scribd company logo
1 of 27
Download to read offline
Assuring the Code Quality of
SharePoint Solutions and Apps
Matthias Einig, MVP
RENCORE AB
Who is that guy?
matthias.einig@rencore.se
www.matthiaseinig.de
Matthias Einig
CEO, SharePoint MVP
Stockholm, Sweden
What is Code Quality?
Source: Consortium for IT Software Quality
• Reliability
• Security
• Efficiency
• Maintainability
• Size
Why should we care?
• Avoid bugs
• Reduce effort (coding & testing)
• Improve maintainability
• Prepare for changes/upgrade
• Increase team flexibility
Code Quality can’t be easily added later!
How to measure Code Quality?
• Architectural standards
• Coding Practices
• Complexity
• Documentation
• Portability
• Tech./Func. Volume
Reliability
Security
Efficiency
Maintainability
Size
How to analyse Code Quality?
• Static vs. Dynamic
• Source Code vs. Object Code
• Manual vs. Automated
• Ad hoc vs. Continuously
Why is it important for SharePoint?
• Solutions / apps are black boxes
• Code quality differs a lot
• Solutions change (ALM)
• Complexity
• Policies / Best Practices
• Dev Teams Change
• Farm stability / security / licensing
So, what is SharePoint Code?
 .NET code
 XML: Manifest, Features,
Content Types, Templates
 HTML, ASPX, ASCX
 CSS, JavaScript
 Images, resources, document templates…
 Deployment locations!
Is my code
correct and follows
best practices?
Developer
Is the code
well designed and
maintainable?
Architect
Does the code
comply with
company policies
and standards?
Quality Manager
Who needs it and why?
Will the code
harm my farm?
Administrator
What Tools do we have?`
ObjectCode FxCop/VSCA
FxCop Metrics
CAT.net
SourceCode StyleCop
SPCode SPDisposeCheck
MSOCAF
Checks against general coding errors
(not SharePoint-specific)
Calculates code metrics
(only .NET code, not SharePoint specific)
Checks coding style guidelines
(only .NET code, not SharePoint specific)
Analyzes code security
(not SharePoint-specific)
Checks memory leaks
(SharePoint-specific)
Combination of FxCop and
SPDisposeCheck for SharePoint Online
The Gap…What’s missing?
• Analyze SharePoint specific code quality!
• Analyze SharePoint dependencies!
• Gather SharePoint metrics!
• Document the SharePoint solution / app!
• Assess the migratability to the app model!
Commerical Products
Free version
SPCop Community Edition
Free version
SPCAF Migration Assessment
CODE ANALYSIS
WITH SPCAF
• Run SPCAF manually or on solution build
• Doubleclick results in Error List to open the
line of code
SPCAF in Visual Studio
SPCAF Client Application
 Use predefined rulesets
e.g. SP2013 Compatibility
 Create your own ruleset
 Enable/disable rules
 Adjust severity of notifications
 Information
 Warning
 Error
Configure Rulesets
Run SPCAF in TeamBuild as Quality Gate
• Custom Build Activity
• Supports TFS 2010/2012/2013, VS Online, Team City etc.
Build in TFS on-premises Build in Visual Studio Online
Continuous Integration
DEVELOP CUSTOM RULES
You want to rule yourself? (1)
using SPCAF.Sdk;
using SPCAF.Sdk.Rules;
using SPCAF.Sdk.Model;
using SPCAF.Sdk.Model.Extensions;
1. Create empty class library
2. Add SPCAF.SDK.dll assembly reference
3. Create class and add usings
4. Add method stub by inheriting from ”Rule”
namespace SP24.Rules
{
public class FeatureNameStartsWithSP24 : Rule<FeatureDefinition>
{
public override void Visit(FeatureDefinition target, NotificationCollection
notifications)
{}
}}
5. Add Rule Metadata
namespace SP24.Rules
{
[RuleMetadata(typeof(Naming),
CheckId = "SPC99001",
DisplayName = "Feature name should start with SP24",
Description = "A feature name should be prefixed with 'SP24'.",
DefaultSeverity = Severity.Warning,
SharePointVersion = new string[] { "12", "14", "15" },
Message = "Feature '{0}' should start with 'SP24'.",
Resolution = "Change the folder name of the feature and add the name at the beginning,
e.g.‘SP24.Intranet.Components.ContentTypesFeature'.")]
public class FeatureNameStartsWithSP24 : Rule<FeatureDefinition>
{
...
You want to rule yourself? (2)
7. Build and drop the assembly into the SPCAF installation folder
public class FeatureNameStartsWithSP24 : Rule<FeatureDefinition>
{
public override void Visit(FeatureDefinition target, NotificationCollection notifications)
{
if (!target.FeatureName.StartsWith("SP24"))
{
string message = string.Format(this.MessageTemplate(), target.FeatureName);
Notify(target, message, notifications);
}
}
}
6. Implement the rule
You want to rule yourself? (3)
Summary
• Code Quality must not be a fluke!
• Helps you to find problems earlier
• Saves your time & money
• Prepares you for changes and upgrades
• QA can be implemented in several steps
Also check out my session:
SharePoint Continuous Integration with VS Online and Azure
D2S3DEV 10/16/2014 11:30 AM
References
• SharePoint Code Analysis Framework
spcaf.com
• Free SPCop Code Check
go.spcaf.com/spcopceI
• Free SPCAF Code Migration Assessment
go.spcaf.com/spcafma
• SharePoint health check: Extracting SP Customizations
url.spcaf.com/extract
questions?
WWW.MATTHIASEINIG.DE
@MATTEIN
thank you.
SHAREPOINT AND PROJECT CONFERENCE ADRIATICS
ZAGREB, 10/15/2014 - 10/16/2014

More Related Content

What's hot

Keyword Driven Testing
Keyword Driven TestingKeyword Driven Testing
Keyword Driven TestingMaveryx
 
Xporter for Jira - Advanced topics
Xporter for Jira  - Advanced topicsXporter for Jira  - Advanced topics
Xporter for Jira - Advanced topicsXpand IT
 
Generic Test Automation Architecture
Generic Test Automation ArchitectureGeneric Test Automation Architecture
Generic Test Automation ArchitectureTestingCR
 
"Experiences Of Test Automation At Spotify" with Kristian Karl
"Experiences Of Test Automation At Spotify" with Kristian Karl"Experiences Of Test Automation At Spotify" with Kristian Karl
"Experiences Of Test Automation At Spotify" with Kristian KarlTEST Huddle
 
Automation Testing with KATALON Cucumber BDD
Automation Testing with KATALON Cucumber BDDAutomation Testing with KATALON Cucumber BDD
Automation Testing with KATALON Cucumber BDDRapidValue
 
SCRIMPS-STD: Test Automation Design Principles - and asking the right questions!
SCRIMPS-STD: Test Automation Design Principles - and asking the right questions!SCRIMPS-STD: Test Automation Design Principles - and asking the right questions!
SCRIMPS-STD: Test Automation Design Principles - and asking the right questions!Richard Robinson
 
Behavior Driven Development with SpecFlow
Behavior Driven Development with SpecFlowBehavior Driven Development with SpecFlow
Behavior Driven Development with SpecFlowRachid Kherrazi
 
Patterns of a "Good" Test Automation Framework, Locators & Data
Patterns of a "Good" Test Automation Framework, Locators & DataPatterns of a "Good" Test Automation Framework, Locators & Data
Patterns of a "Good" Test Automation Framework, Locators & DataAgile Testing Alliance
 
Spec flow – functional testing made easy
Spec flow – functional testing made easySpec flow – functional testing made easy
Spec flow – functional testing made easyPaul Stack
 
An introduction to the office devpnp community initiative
An introduction to the office devpnp community initiativeAn introduction to the office devpnp community initiative
An introduction to the office devpnp community initiativeNigel Price
 
What's new in ALM using Visual Studio 2013 and TFS 2013
What's new in ALM using Visual Studio 2013 and TFS 2013What's new in ALM using Visual Studio 2013 and TFS 2013
What's new in ALM using Visual Studio 2013 and TFS 2013Microsoft Visual Studio
 
Xporter for Jira - Overview
Xporter for Jira - OverviewXporter for Jira - Overview
Xporter for Jira - OverviewXpand IT
 
Whats New In 2010 (Msdn & Visual Studio)
Whats New In 2010 (Msdn & Visual Studio)Whats New In 2010 (Msdn & Visual Studio)
Whats New In 2010 (Msdn & Visual Studio)Steve Lange
 
Preparing for Acquia Certification
Preparing for Acquia CertificationPreparing for Acquia Certification
Preparing for Acquia CertificationAcquia
 
Creating Maintainable Automated Acceptance Tests
Creating Maintainable Automated Acceptance TestsCreating Maintainable Automated Acceptance Tests
Creating Maintainable Automated Acceptance TestsJez Humble
 
Hybrid Automation Framework Development introduction
Hybrid Automation Framework Development introductionHybrid Automation Framework Development introduction
Hybrid Automation Framework Development introductionGanuka Yashantha
 

What's hot (20)

Keyword Driven Testing
Keyword Driven TestingKeyword Driven Testing
Keyword Driven Testing
 
Xporter for Jira - Advanced topics
Xporter for Jira  - Advanced topicsXporter for Jira  - Advanced topics
Xporter for Jira - Advanced topics
 
Introduction to dax7 IDE
Introduction to dax7 IDEIntroduction to dax7 IDE
Introduction to dax7 IDE
 
Generic Test Automation Architecture
Generic Test Automation ArchitectureGeneric Test Automation Architecture
Generic Test Automation Architecture
 
BDD for APIs
BDD for APIsBDD for APIs
BDD for APIs
 
"Experiences Of Test Automation At Spotify" with Kristian Karl
"Experiences Of Test Automation At Spotify" with Kristian Karl"Experiences Of Test Automation At Spotify" with Kristian Karl
"Experiences Of Test Automation At Spotify" with Kristian Karl
 
Automation Testing with KATALON Cucumber BDD
Automation Testing with KATALON Cucumber BDDAutomation Testing with KATALON Cucumber BDD
Automation Testing with KATALON Cucumber BDD
 
SCRIMPS-STD: Test Automation Design Principles - and asking the right questions!
SCRIMPS-STD: Test Automation Design Principles - and asking the right questions!SCRIMPS-STD: Test Automation Design Principles - and asking the right questions!
SCRIMPS-STD: Test Automation Design Principles - and asking the right questions!
 
Behavior Driven Development with SpecFlow
Behavior Driven Development with SpecFlowBehavior Driven Development with SpecFlow
Behavior Driven Development with SpecFlow
 
Vsts 2
Vsts 2Vsts 2
Vsts 2
 
Patterns of a "Good" Test Automation Framework, Locators & Data
Patterns of a "Good" Test Automation Framework, Locators & DataPatterns of a "Good" Test Automation Framework, Locators & Data
Patterns of a "Good" Test Automation Framework, Locators & Data
 
Spec flow – functional testing made easy
Spec flow – functional testing made easySpec flow – functional testing made easy
Spec flow – functional testing made easy
 
Using Specflow for BDD
Using Specflow for BDDUsing Specflow for BDD
Using Specflow for BDD
 
An introduction to the office devpnp community initiative
An introduction to the office devpnp community initiativeAn introduction to the office devpnp community initiative
An introduction to the office devpnp community initiative
 
What's new in ALM using Visual Studio 2013 and TFS 2013
What's new in ALM using Visual Studio 2013 and TFS 2013What's new in ALM using Visual Studio 2013 and TFS 2013
What's new in ALM using Visual Studio 2013 and TFS 2013
 
Xporter for Jira - Overview
Xporter for Jira - OverviewXporter for Jira - Overview
Xporter for Jira - Overview
 
Whats New In 2010 (Msdn & Visual Studio)
Whats New In 2010 (Msdn & Visual Studio)Whats New In 2010 (Msdn & Visual Studio)
Whats New In 2010 (Msdn & Visual Studio)
 
Preparing for Acquia Certification
Preparing for Acquia CertificationPreparing for Acquia Certification
Preparing for Acquia Certification
 
Creating Maintainable Automated Acceptance Tests
Creating Maintainable Automated Acceptance TestsCreating Maintainable Automated Acceptance Tests
Creating Maintainable Automated Acceptance Tests
 
Hybrid Automation Framework Development introduction
Hybrid Automation Framework Development introductionHybrid Automation Framework Development introduction
Hybrid Automation Framework Development introduction
 

Viewers also liked

Sociální média v interní komunikaci
Sociální média v interní komunikaciSociální média v interní komunikaci
Sociální média v interní komunikaciJan Vyšehradský
 
Articulo proceso de_redistribuci_n_rea_de_picking_alimentos_carnicos_s
Articulo proceso de_redistribuci_n_rea_de_picking_alimentos_carnicos_sArticulo proceso de_redistribuci_n_rea_de_picking_alimentos_carnicos_s
Articulo proceso de_redistribuci_n_rea_de_picking_alimentos_carnicos_sAdriana Díaz Vargas
 
How will my magazine be promoted and sold
How will my magazine be promoted and soldHow will my magazine be promoted and sold
How will my magazine be promoted and soldGeorgia Dye
 
How to put your resume on craigslist for Virtual Assistants
How to put your resume on craigslist for Virtual AssistantsHow to put your resume on craigslist for Virtual Assistants
How to put your resume on craigslist for Virtual AssistantsNatasha Rivera
 
Generations Finding Common Ground
Generations Finding Common GroundGenerations Finding Common Ground
Generations Finding Common GroundLaura Holt
 
How will my magazine be promoted and sold
How will my magazine be promoted and soldHow will my magazine be promoted and sold
How will my magazine be promoted and soldGeorgia Dye
 
IBEA Cougar Perk Presentation
IBEA Cougar Perk PresentationIBEA Cougar Perk Presentation
IBEA Cougar Perk Presentationmrsertl
 
Structuration touristique, une question de méthode Rencontre réseau 05042016 ...
Structuration touristique, une question de méthode Rencontre réseau 05042016 ...Structuration touristique, une question de méthode Rencontre réseau 05042016 ...
Structuration touristique, une question de méthode Rencontre réseau 05042016 ...MONA
 
KCSE Leaving Certificate
KCSE Leaving CertificateKCSE Leaving Certificate
KCSE Leaving CertificateJullies Nyash
 

Viewers also liked (14)

Story #3 final draft
Story #3 final draftStory #3 final draft
Story #3 final draft
 
Sociální média v interní komunikaci
Sociální média v interní komunikaciSociální média v interní komunikaci
Sociální média v interní komunikaci
 
Articulo proceso de_redistribuci_n_rea_de_picking_alimentos_carnicos_s
Articulo proceso de_redistribuci_n_rea_de_picking_alimentos_carnicos_sArticulo proceso de_redistribuci_n_rea_de_picking_alimentos_carnicos_s
Articulo proceso de_redistribuci_n_rea_de_picking_alimentos_carnicos_s
 
How will my magazine be promoted and sold
How will my magazine be promoted and soldHow will my magazine be promoted and sold
How will my magazine be promoted and sold
 
yi logo
yi logoyi logo
yi logo
 
Didier.de.saint.pierre.es
Didier.de.saint.pierre.esDidier.de.saint.pierre.es
Didier.de.saint.pierre.es
 
Ryan et al 2014
Ryan et al 2014Ryan et al 2014
Ryan et al 2014
 
How to put your resume on craigslist for Virtual Assistants
How to put your resume on craigslist for Virtual AssistantsHow to put your resume on craigslist for Virtual Assistants
How to put your resume on craigslist for Virtual Assistants
 
Generations Finding Common Ground
Generations Finding Common GroundGenerations Finding Common Ground
Generations Finding Common Ground
 
Vólvamonos Locos
Vólvamonos LocosVólvamonos Locos
Vólvamonos Locos
 
How will my magazine be promoted and sold
How will my magazine be promoted and soldHow will my magazine be promoted and sold
How will my magazine be promoted and sold
 
IBEA Cougar Perk Presentation
IBEA Cougar Perk PresentationIBEA Cougar Perk Presentation
IBEA Cougar Perk Presentation
 
Structuration touristique, une question de méthode Rencontre réseau 05042016 ...
Structuration touristique, une question de méthode Rencontre réseau 05042016 ...Structuration touristique, une question de méthode Rencontre réseau 05042016 ...
Structuration touristique, une question de méthode Rencontre réseau 05042016 ...
 
KCSE Leaving Certificate
KCSE Leaving CertificateKCSE Leaving Certificate
KCSE Leaving Certificate
 

Similar to Assuringthecodequalityofsharepointsolutionsandapps 141023024802-conversion-gate01

Assuring the code quality of share point solutions and apps - Matthias Einig
Assuring the code quality of share point solutions and apps - Matthias EinigAssuring the code quality of share point solutions and apps - Matthias Einig
Assuring the code quality of share point solutions and apps - Matthias EinigSPC Adriatics
 
Developing high quality SharePoint solutions/apps with SPCAF #SP24
Developing high quality SharePoint solutions/apps with SPCAF #SP24Developing high quality SharePoint solutions/apps with SPCAF #SP24
Developing high quality SharePoint solutions/apps with SPCAF #SP24Matthias Einig
 
SPCA2013 - Building a SharePoint Factory
SPCA2013 - Building a SharePoint FactorySPCA2013 - Building a SharePoint Factory
SPCA2013 - Building a SharePoint FactoryNCCOMMS
 
Acing application lifecycle management in SharePoint
Acing application lifecycle management in SharePointAcing application lifecycle management in SharePoint
Acing application lifecycle management in SharePointJeremy Thake
 
The Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs PublicThe Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs PublicDavid Solivan
 
SPCA2013 - Test-driven Development with SharePoint 2013 and Visual Studio
SPCA2013 - Test-driven Development with SharePoint 2013 and Visual StudioSPCA2013 - Test-driven Development with SharePoint 2013 and Visual Studio
SPCA2013 - Test-driven Development with SharePoint 2013 and Visual StudioNCCOMMS
 
Understanding SharePoint Framework Extensions
Understanding SharePoint Framework ExtensionsUnderstanding SharePoint Framework Extensions
Understanding SharePoint Framework ExtensionsBIWUG
 
SharePoint 2013 Dev Features
SharePoint 2013 Dev FeaturesSharePoint 2013 Dev Features
SharePoint 2013 Dev FeaturesRicardo Wilkins
 
Spsnyc transforming share point farm solutions to the add-in model and shar...
Spsnyc   transforming share point farm solutions to the add-in model and shar...Spsnyc   transforming share point farm solutions to the add-in model and shar...
Spsnyc transforming share point farm solutions to the add-in model and shar...spsnyc
 
Building A Product Assortment Recommendation Engine
Building A Product Assortment Recommendation EngineBuilding A Product Assortment Recommendation Engine
Building A Product Assortment Recommendation EngineDatabricks
 
Setting Up CircleCI Workflows for Your Salesforce Apps
Setting Up CircleCI Workflows for Your Salesforce AppsSetting Up CircleCI Workflows for Your Salesforce Apps
Setting Up CircleCI Workflows for Your Salesforce AppsDaniel Stange
 
Sitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helixSitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helixPeter Nazarov
 
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Anupam Ranku
 
[Pinto] Is my SharePoint Development team properly enlighted?
[Pinto] Is my SharePoint Development team properly enlighted?[Pinto] Is my SharePoint Development team properly enlighted?
[Pinto] Is my SharePoint Development team properly enlighted?European Collaboration Summit
 
Practical Business Intelligence in SharePoint 2013 - Honolulu
Practical Business Intelligence in SharePoint 2013 - HonoluluPractical Business Intelligence in SharePoint 2013 - Honolulu
Practical Business Intelligence in SharePoint 2013 - HonoluluIvan Sanders
 
Matthias Einig from Rencore - Transforming SharePoint farm solutions to the A...
Matthias Einig from Rencore - Transforming SharePoint farm solutions to the A...Matthias Einig from Rencore - Transforming SharePoint farm solutions to the A...
Matthias Einig from Rencore - Transforming SharePoint farm solutions to the A...Rencore
 
Transforming your full-trust solutions to the Add-in model / SharePoint Frame...
Transforming your full-trust solutions to the Add-in model / SharePoint Frame...Transforming your full-trust solutions to the Add-in model / SharePoint Frame...
Transforming your full-trust solutions to the Add-in model / SharePoint Frame...SUGES (SharePoint Users Group España)
 
Improving The Quality of Existing Software
Improving The Quality of Existing SoftwareImproving The Quality of Existing Software
Improving The Quality of Existing SoftwareSteven Smith
 
Best of barcelona symposium experience
Best of barcelona symposium experienceBest of barcelona symposium experience
Best of barcelona symposium experienceThe Reference
 
Testing SharePoint solutions overview
Testing SharePoint solutions overviewTesting SharePoint solutions overview
Testing SharePoint solutions overviewSpiffy
 

Similar to Assuringthecodequalityofsharepointsolutionsandapps 141023024802-conversion-gate01 (20)

Assuring the code quality of share point solutions and apps - Matthias Einig
Assuring the code quality of share point solutions and apps - Matthias EinigAssuring the code quality of share point solutions and apps - Matthias Einig
Assuring the code quality of share point solutions and apps - Matthias Einig
 
Developing high quality SharePoint solutions/apps with SPCAF #SP24
Developing high quality SharePoint solutions/apps with SPCAF #SP24Developing high quality SharePoint solutions/apps with SPCAF #SP24
Developing high quality SharePoint solutions/apps with SPCAF #SP24
 
SPCA2013 - Building a SharePoint Factory
SPCA2013 - Building a SharePoint FactorySPCA2013 - Building a SharePoint Factory
SPCA2013 - Building a SharePoint Factory
 
Acing application lifecycle management in SharePoint
Acing application lifecycle management in SharePointAcing application lifecycle management in SharePoint
Acing application lifecycle management in SharePoint
 
The Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs PublicThe Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs Public
 
SPCA2013 - Test-driven Development with SharePoint 2013 and Visual Studio
SPCA2013 - Test-driven Development with SharePoint 2013 and Visual StudioSPCA2013 - Test-driven Development with SharePoint 2013 and Visual Studio
SPCA2013 - Test-driven Development with SharePoint 2013 and Visual Studio
 
Understanding SharePoint Framework Extensions
Understanding SharePoint Framework ExtensionsUnderstanding SharePoint Framework Extensions
Understanding SharePoint Framework Extensions
 
SharePoint 2013 Dev Features
SharePoint 2013 Dev FeaturesSharePoint 2013 Dev Features
SharePoint 2013 Dev Features
 
Spsnyc transforming share point farm solutions to the add-in model and shar...
Spsnyc   transforming share point farm solutions to the add-in model and shar...Spsnyc   transforming share point farm solutions to the add-in model and shar...
Spsnyc transforming share point farm solutions to the add-in model and shar...
 
Building A Product Assortment Recommendation Engine
Building A Product Assortment Recommendation EngineBuilding A Product Assortment Recommendation Engine
Building A Product Assortment Recommendation Engine
 
Setting Up CircleCI Workflows for Your Salesforce Apps
Setting Up CircleCI Workflows for Your Salesforce AppsSetting Up CircleCI Workflows for Your Salesforce Apps
Setting Up CircleCI Workflows for Your Salesforce Apps
 
Sitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helixSitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helix
 
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
 
[Pinto] Is my SharePoint Development team properly enlighted?
[Pinto] Is my SharePoint Development team properly enlighted?[Pinto] Is my SharePoint Development team properly enlighted?
[Pinto] Is my SharePoint Development team properly enlighted?
 
Practical Business Intelligence in SharePoint 2013 - Honolulu
Practical Business Intelligence in SharePoint 2013 - HonoluluPractical Business Intelligence in SharePoint 2013 - Honolulu
Practical Business Intelligence in SharePoint 2013 - Honolulu
 
Matthias Einig from Rencore - Transforming SharePoint farm solutions to the A...
Matthias Einig from Rencore - Transforming SharePoint farm solutions to the A...Matthias Einig from Rencore - Transforming SharePoint farm solutions to the A...
Matthias Einig from Rencore - Transforming SharePoint farm solutions to the A...
 
Transforming your full-trust solutions to the Add-in model / SharePoint Frame...
Transforming your full-trust solutions to the Add-in model / SharePoint Frame...Transforming your full-trust solutions to the Add-in model / SharePoint Frame...
Transforming your full-trust solutions to the Add-in model / SharePoint Frame...
 
Improving The Quality of Existing Software
Improving The Quality of Existing SoftwareImproving The Quality of Existing Software
Improving The Quality of Existing Software
 
Best of barcelona symposium experience
Best of barcelona symposium experienceBest of barcelona symposium experience
Best of barcelona symposium experience
 
Testing SharePoint solutions overview
Testing SharePoint solutions overviewTesting SharePoint solutions overview
Testing SharePoint solutions overview
 

Recently uploaded

The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...Aggregage
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageMatteo Carbone
 
7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...Paul Menig
 
Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsP&CO
 
Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Roland Driesen
 
Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...Roland Driesen
 
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Dipal Arora
 
It will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayIt will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayNZSG
 
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...Any kyc Account
 
M.C Lodges -- Guest House in Jhang.
M.C Lodges --  Guest House in Jhang.M.C Lodges --  Guest House in Jhang.
M.C Lodges -- Guest House in Jhang.Aaiza Hassan
 
Monte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSMMonte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSMRavindra Nath Shukla
 
Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxAndy Lambert
 
Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Neil Kimberley
 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Dave Litwiller
 
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdfRenandantas16
 
RSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataRSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataExhibitors Data
 
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangaloreamitlee9823
 
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...amitlee9823
 
Regression analysis: Simple Linear Regression Multiple Linear Regression
Regression analysis:  Simple Linear Regression Multiple Linear RegressionRegression analysis:  Simple Linear Regression Multiple Linear Regression
Regression analysis: Simple Linear Regression Multiple Linear RegressionRavindra Nath Shukla
 
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case studyThe Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case studyEthan lee
 

Recently uploaded (20)

The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usage
 
7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...
 
Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and pains
 
Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...
 
Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...
 
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
 
It will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayIt will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 May
 
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
 
M.C Lodges -- Guest House in Jhang.
M.C Lodges --  Guest House in Jhang.M.C Lodges --  Guest House in Jhang.
M.C Lodges -- Guest House in Jhang.
 
Monte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSMMonte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSM
 
Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptx
 
Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023
 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
 
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
 
RSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataRSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors Data
 
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
 
Regression analysis: Simple Linear Regression Multiple Linear Regression
Regression analysis:  Simple Linear Regression Multiple Linear RegressionRegression analysis:  Simple Linear Regression Multiple Linear Regression
Regression analysis: Simple Linear Regression Multiple Linear Regression
 
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case studyThe Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
 

Assuringthecodequalityofsharepointsolutionsandapps 141023024802-conversion-gate01

  • 1. Assuring the Code Quality of SharePoint Solutions and Apps Matthias Einig, MVP RENCORE AB
  • 2.
  • 3. Who is that guy? matthias.einig@rencore.se www.matthiaseinig.de Matthias Einig CEO, SharePoint MVP Stockholm, Sweden
  • 4. What is Code Quality? Source: Consortium for IT Software Quality • Reliability • Security • Efficiency • Maintainability • Size
  • 5. Why should we care? • Avoid bugs • Reduce effort (coding & testing) • Improve maintainability • Prepare for changes/upgrade • Increase team flexibility Code Quality can’t be easily added later!
  • 6.
  • 7. How to measure Code Quality? • Architectural standards • Coding Practices • Complexity • Documentation • Portability • Tech./Func. Volume Reliability Security Efficiency Maintainability Size
  • 8. How to analyse Code Quality? • Static vs. Dynamic • Source Code vs. Object Code • Manual vs. Automated • Ad hoc vs. Continuously
  • 9. Why is it important for SharePoint? • Solutions / apps are black boxes • Code quality differs a lot • Solutions change (ALM) • Complexity • Policies / Best Practices • Dev Teams Change • Farm stability / security / licensing
  • 10. So, what is SharePoint Code?  .NET code  XML: Manifest, Features, Content Types, Templates  HTML, ASPX, ASCX  CSS, JavaScript  Images, resources, document templates…  Deployment locations!
  • 11. Is my code correct and follows best practices? Developer Is the code well designed and maintainable? Architect Does the code comply with company policies and standards? Quality Manager Who needs it and why? Will the code harm my farm? Administrator
  • 12. What Tools do we have?` ObjectCode FxCop/VSCA FxCop Metrics CAT.net SourceCode StyleCop SPCode SPDisposeCheck MSOCAF Checks against general coding errors (not SharePoint-specific) Calculates code metrics (only .NET code, not SharePoint specific) Checks coding style guidelines (only .NET code, not SharePoint specific) Analyzes code security (not SharePoint-specific) Checks memory leaks (SharePoint-specific) Combination of FxCop and SPDisposeCheck for SharePoint Online
  • 13. The Gap…What’s missing? • Analyze SharePoint specific code quality! • Analyze SharePoint dependencies! • Gather SharePoint metrics! • Document the SharePoint solution / app! • Assess the migratability to the app model!
  • 14. Commerical Products Free version SPCop Community Edition Free version SPCAF Migration Assessment
  • 16. • Run SPCAF manually or on solution build • Doubleclick results in Error List to open the line of code SPCAF in Visual Studio
  • 18.  Use predefined rulesets e.g. SP2013 Compatibility  Create your own ruleset  Enable/disable rules  Adjust severity of notifications  Information  Warning  Error Configure Rulesets
  • 19. Run SPCAF in TeamBuild as Quality Gate • Custom Build Activity • Supports TFS 2010/2012/2013, VS Online, Team City etc. Build in TFS on-premises Build in Visual Studio Online Continuous Integration
  • 21. You want to rule yourself? (1) using SPCAF.Sdk; using SPCAF.Sdk.Rules; using SPCAF.Sdk.Model; using SPCAF.Sdk.Model.Extensions; 1. Create empty class library 2. Add SPCAF.SDK.dll assembly reference 3. Create class and add usings 4. Add method stub by inheriting from ”Rule” namespace SP24.Rules { public class FeatureNameStartsWithSP24 : Rule<FeatureDefinition> { public override void Visit(FeatureDefinition target, NotificationCollection notifications) {} }}
  • 22. 5. Add Rule Metadata namespace SP24.Rules { [RuleMetadata(typeof(Naming), CheckId = "SPC99001", DisplayName = "Feature name should start with SP24", Description = "A feature name should be prefixed with 'SP24'.", DefaultSeverity = Severity.Warning, SharePointVersion = new string[] { "12", "14", "15" }, Message = "Feature '{0}' should start with 'SP24'.", Resolution = "Change the folder name of the feature and add the name at the beginning, e.g.‘SP24.Intranet.Components.ContentTypesFeature'.")] public class FeatureNameStartsWithSP24 : Rule<FeatureDefinition> { ... You want to rule yourself? (2)
  • 23. 7. Build and drop the assembly into the SPCAF installation folder public class FeatureNameStartsWithSP24 : Rule<FeatureDefinition> { public override void Visit(FeatureDefinition target, NotificationCollection notifications) { if (!target.FeatureName.StartsWith("SP24")) { string message = string.Format(this.MessageTemplate(), target.FeatureName); Notify(target, message, notifications); } } } 6. Implement the rule You want to rule yourself? (3)
  • 24. Summary • Code Quality must not be a fluke! • Helps you to find problems earlier • Saves your time & money • Prepares you for changes and upgrades • QA can be implemented in several steps Also check out my session: SharePoint Continuous Integration with VS Online and Azure D2S3DEV 10/16/2014 11:30 AM
  • 25. References • SharePoint Code Analysis Framework spcaf.com • Free SPCop Code Check go.spcaf.com/spcopceI • Free SPCAF Code Migration Assessment go.spcaf.com/spcafma • SharePoint health check: Extracting SP Customizations url.spcaf.com/extract
  • 27. thank you. SHAREPOINT AND PROJECT CONFERENCE ADRIATICS ZAGREB, 10/15/2014 - 10/16/2014