SlideShare a Scribd company logo
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

Putting the SPARK into Virtual Training.pptx
Putting the SPARK into Virtual Training.pptxPutting the SPARK into Virtual Training.pptx
Putting the SPARK into Virtual Training.pptxCynthia Clay
 
IPTV Subscription in Ireland: Elevating Your Entertainment Experience
IPTV Subscription in Ireland: Elevating Your Entertainment ExperienceIPTV Subscription in Ireland: Elevating Your Entertainment Experience
IPTV Subscription in Ireland: Elevating Your Entertainment ExperienceDragon Dream Bar
 
Filing Your Delaware Franchise Tax A Detailed Guide
Filing Your Delaware Franchise Tax A Detailed GuideFiling Your Delaware Franchise Tax A Detailed Guide
Filing Your Delaware Franchise Tax A Detailed GuideYourLegal Accounting
 
sales plan presentation by mckinsey alum
sales plan presentation by mckinsey alumsales plan presentation by mckinsey alum
sales plan presentation by mckinsey alumzyqmx62fgm
 
NewBase 24 May 2024 Energy News issue - 1727 by Khaled Al Awadi_compresse...
NewBase   24 May  2024  Energy News issue - 1727 by Khaled Al Awadi_compresse...NewBase   24 May  2024  Energy News issue - 1727 by Khaled Al Awadi_compresse...
NewBase 24 May 2024 Energy News issue - 1727 by Khaled Al Awadi_compresse...Khaled Al Awadi
 
Affordable Stationery Printing Services in Jaipur | Navpack n Print
Affordable Stationery Printing Services in Jaipur | Navpack n PrintAffordable Stationery Printing Services in Jaipur | Navpack n Print
Affordable Stationery Printing Services in Jaipur | Navpack n PrintNavpack & Print
 
RMD24 | Retail media: hoe zet je dit in als je geen AH of Unilever bent? Heid...
RMD24 | Retail media: hoe zet je dit in als je geen AH of Unilever bent? Heid...RMD24 | Retail media: hoe zet je dit in als je geen AH of Unilever bent? Heid...
RMD24 | Retail media: hoe zet je dit in als je geen AH of Unilever bent? Heid...BBPMedia1
 
20240425_ TJ Communications Credentials_compressed.pdf
20240425_ TJ Communications Credentials_compressed.pdf20240425_ TJ Communications Credentials_compressed.pdf
20240425_ TJ Communications Credentials_compressed.pdftjcomstrang
 
Global Interconnection Group Joint Venture[960] (1).pdf
Global Interconnection Group Joint Venture[960] (1).pdfGlobal Interconnection Group Joint Venture[960] (1).pdf
Global Interconnection Group Joint Venture[960] (1).pdfHenry Tapper
 
Strategy Analysis and Selecting ( Space Matrix)
Strategy Analysis and Selecting ( Space Matrix)Strategy Analysis and Selecting ( Space Matrix)
Strategy Analysis and Selecting ( Space Matrix)RidaKhan334971
 
Hyundai capital 2024 1quarter Earnings release
Hyundai capital 2024 1quarter Earnings releaseHyundai capital 2024 1quarter Earnings release
Hyundai capital 2024 1quarter Earnings releaseirhcs
 
Improving profitability for small business
Improving profitability for small businessImproving profitability for small business
Improving profitability for small businessBen Wann
 
Understanding UAE Labour Law: Key Points for Employers and Employees
Understanding UAE Labour Law: Key Points for Employers and EmployeesUnderstanding UAE Labour Law: Key Points for Employers and Employees
Understanding UAE Labour Law: Key Points for Employers and EmployeesDragon Dream Bar
 
Lookback Analysis
Lookback AnalysisLookback Analysis
Lookback AnalysisSafe PaaS
 
Transforming Max Life Insurance with PMaps Job-Fit Assessments- Case Study
Transforming Max Life Insurance with PMaps Job-Fit Assessments- Case StudyTransforming Max Life Insurance with PMaps Job-Fit Assessments- Case Study
Transforming Max Life Insurance with PMaps Job-Fit Assessments- Case StudyPMaps Assessments
 
Team-Spandex-Northern University-CS1035.
Team-Spandex-Northern University-CS1035.Team-Spandex-Northern University-CS1035.
Team-Spandex-Northern University-CS1035.smalmahmud11
 
RMD24 | Debunking the non-endemic revenue myth Marvin Vacquier Droop | First ...
RMD24 | Debunking the non-endemic revenue myth Marvin Vacquier Droop | First ...RMD24 | Debunking the non-endemic revenue myth Marvin Vacquier Droop | First ...
RMD24 | Debunking the non-endemic revenue myth Marvin Vacquier Droop | First ...BBPMedia1
 
What are the main advantages of using HR recruiter services.pdf
What are the main advantages of using HR recruiter services.pdfWhat are the main advantages of using HR recruiter services.pdf
What are the main advantages of using HR recruiter services.pdfHumanResourceDimensi1
 
Pitch Deck Teardown: RAW Dating App's $3M Angel deck
Pitch Deck Teardown: RAW Dating App's $3M Angel deckPitch Deck Teardown: RAW Dating App's $3M Angel deck
Pitch Deck Teardown: RAW Dating App's $3M Angel deckHajeJanKamps
 
Accpac to QuickBooks Conversion Navigating the Transition with Online Account...
Accpac to QuickBooks Conversion Navigating the Transition with Online Account...Accpac to QuickBooks Conversion Navigating the Transition with Online Account...
Accpac to QuickBooks Conversion Navigating the Transition with Online Account...PaulBryant58
 

Recently uploaded (20)

Putting the SPARK into Virtual Training.pptx
Putting the SPARK into Virtual Training.pptxPutting the SPARK into Virtual Training.pptx
Putting the SPARK into Virtual Training.pptx
 
IPTV Subscription in Ireland: Elevating Your Entertainment Experience
IPTV Subscription in Ireland: Elevating Your Entertainment ExperienceIPTV Subscription in Ireland: Elevating Your Entertainment Experience
IPTV Subscription in Ireland: Elevating Your Entertainment Experience
 
Filing Your Delaware Franchise Tax A Detailed Guide
Filing Your Delaware Franchise Tax A Detailed GuideFiling Your Delaware Franchise Tax A Detailed Guide
Filing Your Delaware Franchise Tax A Detailed Guide
 
sales plan presentation by mckinsey alum
sales plan presentation by mckinsey alumsales plan presentation by mckinsey alum
sales plan presentation by mckinsey alum
 
NewBase 24 May 2024 Energy News issue - 1727 by Khaled Al Awadi_compresse...
NewBase   24 May  2024  Energy News issue - 1727 by Khaled Al Awadi_compresse...NewBase   24 May  2024  Energy News issue - 1727 by Khaled Al Awadi_compresse...
NewBase 24 May 2024 Energy News issue - 1727 by Khaled Al Awadi_compresse...
 
Affordable Stationery Printing Services in Jaipur | Navpack n Print
Affordable Stationery Printing Services in Jaipur | Navpack n PrintAffordable Stationery Printing Services in Jaipur | Navpack n Print
Affordable Stationery Printing Services in Jaipur | Navpack n Print
 
RMD24 | Retail media: hoe zet je dit in als je geen AH of Unilever bent? Heid...
RMD24 | Retail media: hoe zet je dit in als je geen AH of Unilever bent? Heid...RMD24 | Retail media: hoe zet je dit in als je geen AH of Unilever bent? Heid...
RMD24 | Retail media: hoe zet je dit in als je geen AH of Unilever bent? Heid...
 
20240425_ TJ Communications Credentials_compressed.pdf
20240425_ TJ Communications Credentials_compressed.pdf20240425_ TJ Communications Credentials_compressed.pdf
20240425_ TJ Communications Credentials_compressed.pdf
 
Global Interconnection Group Joint Venture[960] (1).pdf
Global Interconnection Group Joint Venture[960] (1).pdfGlobal Interconnection Group Joint Venture[960] (1).pdf
Global Interconnection Group Joint Venture[960] (1).pdf
 
Strategy Analysis and Selecting ( Space Matrix)
Strategy Analysis and Selecting ( Space Matrix)Strategy Analysis and Selecting ( Space Matrix)
Strategy Analysis and Selecting ( Space Matrix)
 
Hyundai capital 2024 1quarter Earnings release
Hyundai capital 2024 1quarter Earnings releaseHyundai capital 2024 1quarter Earnings release
Hyundai capital 2024 1quarter Earnings release
 
Improving profitability for small business
Improving profitability for small businessImproving profitability for small business
Improving profitability for small business
 
Understanding UAE Labour Law: Key Points for Employers and Employees
Understanding UAE Labour Law: Key Points for Employers and EmployeesUnderstanding UAE Labour Law: Key Points for Employers and Employees
Understanding UAE Labour Law: Key Points for Employers and Employees
 
Lookback Analysis
Lookback AnalysisLookback Analysis
Lookback Analysis
 
Transforming Max Life Insurance with PMaps Job-Fit Assessments- Case Study
Transforming Max Life Insurance with PMaps Job-Fit Assessments- Case StudyTransforming Max Life Insurance with PMaps Job-Fit Assessments- Case Study
Transforming Max Life Insurance with PMaps Job-Fit Assessments- Case Study
 
Team-Spandex-Northern University-CS1035.
Team-Spandex-Northern University-CS1035.Team-Spandex-Northern University-CS1035.
Team-Spandex-Northern University-CS1035.
 
RMD24 | Debunking the non-endemic revenue myth Marvin Vacquier Droop | First ...
RMD24 | Debunking the non-endemic revenue myth Marvin Vacquier Droop | First ...RMD24 | Debunking the non-endemic revenue myth Marvin Vacquier Droop | First ...
RMD24 | Debunking the non-endemic revenue myth Marvin Vacquier Droop | First ...
 
What are the main advantages of using HR recruiter services.pdf
What are the main advantages of using HR recruiter services.pdfWhat are the main advantages of using HR recruiter services.pdf
What are the main advantages of using HR recruiter services.pdf
 
Pitch Deck Teardown: RAW Dating App's $3M Angel deck
Pitch Deck Teardown: RAW Dating App's $3M Angel deckPitch Deck Teardown: RAW Dating App's $3M Angel deck
Pitch Deck Teardown: RAW Dating App's $3M Angel deck
 
Accpac to QuickBooks Conversion Navigating the Transition with Online Account...
Accpac to QuickBooks Conversion Navigating the Transition with Online Account...Accpac to QuickBooks Conversion Navigating the Transition with Online Account...
Accpac to QuickBooks Conversion Navigating the Transition with Online Account...
 

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