SlideShare une entreprise Scribd logo
1  sur  51
Télécharger pour lire hors ligne
SharePoint Nightmares
Coding Patterns and Practices

Donald Hessing | @dhessing
Who am I?

Donald Hessing
 Principal Consultant | Thought Leader SharePoint
@Capgemini Netherlands
 (Virtual) Technology Solution Professional for Microsoft
 Work full time on SharePoint since 2007
 donald.hessing@capgemini.com | @dhessing

Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

3
Agenda
1.
2.
3.
4.
5.

SharePoint Anti-Patterns
Data Access
Dispose and PowerShell
REST versus CSOM
SharePoint provisioning techniques

Demos:
 Service Locator Pattern 2010/2013
 PowerShell Dispose

Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

4
SharePoint Anti-Patterns
True or False

web.Lists[“Pages”] == web.Lists[“Pages”]

Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

7
Anti Pattern SPList[]
1: web.Lists[“Events”].EnableAttachments = false;
2: web.Lists[“Events”].Update();
SPList object in line 1 is not the same as in line 2
1: SPList list= web.Lists[“Events”];
2: list.EnableAttachments = false;
3: list.Update();

Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

9
BDEADEE2-C265-11D0-BCED-00A0C90AB50F
SP.SPRequest
SP.SPRequest
Microsoft.SharePoint.dll

SPRequest

SPSite
_m_Request : SPRequest

Unmanaged
OWSSVR.DLL
SP.SPRequest (Unmanaged)
ClassID:
BDEADEE2-C265-11D0-BCED-00A0C90AB50F

Unmanaged

Presentation Title | Date

Copyright © Capgemini 2012. All Rights Reserved

11
SPRequest
 SPRequest is a wrapper for unmanaged class SP.SPRequest
 SP.SPRequest is a COM Object that is coming from SharePoint Portal
Services back in 2001
 Most retrieval and write operations to SharePoint (SPSite, SPWeb, SPList)
are still implemented by SP.SPRequest
OWSSVR.DLL
SP.SPRequest (Unmanaged)
ClassID:
BDEADEE2-C265-11D0-BCED-00A0C90AB50F

More:
http://hristopavlov.wordpress.com/2009/01/19/understanding-sharepoint-sprequest/
Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

12
Anti Pattern SPList[]

SPS.SPRequest
.EnabledAttachments (false)

1: web.Lists[“Events”].EnableAttachments = false;
2: web.Lists[“Events”].Update();

SPS.SPRequest
.EnabledAttachments (true)

Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

13
Anti-Pattern SPList.Items

Show the items of from SPList
SPList list = SPContext.Current.List;
for(int i=0;i<100 && i<list.Items.Count;i++)
{
SPListItem listItem = list.Items[i];
ShowTitle(listItem["Title"].ToString());
}

Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

14
Good or Bad?

Show the items of from SPList
SPList list = SPContext.Current.List;
for(int i=0;i<100 && i<list.ItemsCount;i++)
{
….
}
SPList.ItemCount is an optimized property for performance reasons. This
property can occasionally return unexpected results. If the precise number is
required (in loops) than the SPList.Items.Count property should be used to
preven index out of range exceptions!
Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

15
Improved Pattern
SPQuery query = new SPQuery();
query.RowLimit = 100;
query. ViewFields = “<FieldRef Name='Title' />”;
query. ViewFieldsOnly = true;
SPListItemCollection items =
SPContext.Current.List.GetItems(query);

for (int i=0;i<items.Count;i++)
{
SPListItem listItem = items[i];
ShowTitle(listItem["Title"].ToString());
}
Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

16
Anti-Pattern SPList.Items
Each call of .Items retrieves all items from the database!
Not needed when:
 SPList.Items[0], SPList.Items.Count
 SPList.Items can’t benefit from indices

SPList.Items can LOCK your content database
When needed, sort the collection of SPList.Items in a
SPListCollection variable
Use SPQuery for list data retrieval (CAMLQueryBuilder)
Use SPSiteDataQuery for cross list items
 Use the RowLimit property of the query object

Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

17
Tools… See “Building a SP Factory”
SharePoint 2013

SharePoint 2010
 SPDisposeCheck.exe
 MSOCAF 2010
 FXContrib
 SPCOP / SPCAF Foundation
 FXCop
 StyleCop
 Visual Studio 2010 / 2012

 MSOCAF 2013
 SPCOP / SPCAF Foundation
 FXCop – Custom Rules
 StyleCop
 Visual Studio 2012 / 2013

•
•

Only tool for SharePoint artefacts,
metrics, feature dependency,
managed code and C# analyses!
Includes TFS and 3th Party
integration (FXCop, JSLint,CAT.NET)
Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

18
(Remote) Event Receivers

Do not use for…

Remote Event Receivers

 Setting Unique permissions on large
 Remote event receivers are
libraries or sites based on meta data or implemented as a webservice endpoint
person
hosted on-premise or Windows Azure.
 Synchronize or mirroring solutions

 NO Guaranteed delivery!

 Mixing list data and relational data  NO Retry like normal messaging
integrity solutions (some relational data infrastructure gives you
stored in SQL Server)
 If you need guaranteed delivery, it’s
better to use the new workflow model!

Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

19
Inherited Permissions
Web object

1

Document library object 1
Folder object

1

Item 1 object

1

Item 2 object

+ User 2 (Reader)

1

Item 3 object

Scope 1

1

+ User 3 (Full Control)
+ User 6 (Contributor)

Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

20
Fine Grained Permissions
Scope 2
+ User 5 (Reader)

Web object

1

Document library object 1

Scope 3

2

Item 1 object

+ User 2 (Limited Access)
+ User 1 (Limited Access)

Folder object

3

Item 2 object

4

Item 3 object

+ User 2 (Reader)

5

+ User 1 (Contributor)

Scope 4

Scope 1

+ User 3 (Full Control)
+ User 6 (Contributor)
+ User 1 (Limited Access)
+ User 2 (Limited Access)
+ User 5 (Limited Access)

+ User 2 (Contributor)

Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

21
Service Locator Pattern
Tightly Coupled

 The implementation of the Service
needs to be available at compile time
 The classes cannot be tested in
isolation because they have direct
references to the implementation
(SPWeb, SPSite objects)
 Class A can only be created when
Service A implementation is finished

Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

25
The Service Locator Pattern

 Class A can now be tested in Isolation as it doesn’t hold any depencies
with the Service A Implementation
 Class A is now loosely coupled to the Service Implementation
Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

26
Example

Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

27
DEMO
Service Locator and Repository Pattern

Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

28
Benefits of these patterns
 Service Locator Pattern
 Decoupled dependency – Logger implementation can now easily be replaced
 The service implementation can be tested in isolation by using a proxy (dummy data)

 Repository Pattern
 Central point to access data
 Can modify the data layer (storage) without too much impact
 Strongly typed access to the data

 Microsoft Patterns and Practices Guide provides implementation for both
patterns for SharePoint 2010
 No specific version for SharePoint 2013 as for now

Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

29
PowerShell and
Dispose()
Dispose() and PowerShell
SharePoint Management Shell ensures disposal of all objects in the
preceding pipeline sequence
Command or single line Pipeline runs a single Thread

Get-SPWebApplication | Get-SPSite -Limit All | Get-SPWeb -Limit All | Select Title

Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

31
SharePoint Management Shell
 SharePoint Management Shell is running multiple lines in the same thread,
ensuring thread safety of the SharePoint unmanaged code
 This is achieved by setting the ThreadOptions=‘ReuseThread’
 SharePoint Management Shell start-up script:
$ver = $host | select version
if ($ver.Version.Major -gt 1)
{$Host.Runspace.ThreadOptions = “ReuseThread”}
Add-PsSnapin Microsoft.SharePoint.PowerShell
Set-location $home

Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

32
Multi-line

 PowerShell that contains multiple lines require manually disposing of objects

 No Help from PowerShell as it doesn’t know when to dispose objects

$site = Get-SPSite "http://sp2013"
Foreach ($web in $site.AllWebs)
{
Write-Host $web.Title
}

Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

33
Start-SPAssignment & Stop-SPAssignment
 Introduced in SharePoint 2010 to overcome memory pressure

 Manages objects for the purpose of proper disposal
 SPWeb
 SPSite
 SPSiteAdministration

Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

35
SPAssignment - Global

SCOPE

Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

36
SPAssignment Namespaces

SCOPE

SCOPE

Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

37
Why is this important?
 PowerShell cannot claim leaked memory until process termination

 Scripts that iterate large Web Applications and performs significant
processing require memory management!
 Batch jobs for Reporting (Versioning, Checked-out, Access, Boundaries)

Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

38
PowerShell - CSOM

Roel Hans Bethlehem: “Extending PowerShell with CSOM”
http://sponlinecmdlets.codeplex.com/
Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

39
DEMO
Service Locator and Repository Pattern SP2010
Service Locator SP2013

Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

40
App Patterns
App-Model Support
Hosting type

SharePoint
Hosted

AutoHosted

Provider Hosted

SharePoint 2013 On Premises
Windows Classic

X

X

X

Windows Claims

√

X

√

SAML Claims

X

X

√**

√

√

√

SharePoint Online / Office 365
Windows Claims

• No support for the SharePoint Public app store as for now
• SAML might requires additional configuration
http://blogs.technet.com/b/speschka/archive/2012/12/07/using-sharepoint-apps-with-saml-and-fba-sites-in-sharepoint-2013.aspx
Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

42
CSOM versus REST
REST versus CSOM

SharePoint
Foundation

User Profile

Search

Taxonomy

Feeds

More…

_api
SharePoint

Execute
Query

Client
JavaScript
Library

Silverlight
Library

OData /
REST
.Net CLR
Library

Clients

SP
Hosted
App

Windows
Phone

Auto
Hosted
App

SP
Hosted
App

Windows
8 RT

iOS,
PHP,
Ruby,etc

Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

44
Limitations REST
 REST calls seems to be more chatty than JSOM
 REST implementation is still a subset of CSOM

Description

REST

JSOM

Updating Content Types

X

√

Post to person news feed

X/√

√

Large file upload

√

X

Batch updates

X

√

X/√

√

Supports jQuery, plugins

√

X

Environment independent

√

X

Well documented

Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

45
Links
 http://spohelper.codeplex.com/
 http://www.sharepointnutsandbolts.com/
 http://blogs.technet.com/b/speschka/archive/2012/12/07/using-sharepointapps-with-saml-and-fba-sites-in-sharepoint-2013.aspx
 http://www.shillier.com/default.aspx
 http://www.slideshare.net/bobbyschang/sharepoint-permissions-worstpractices

Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

47
Key takeaways
 SharePoint Server Side Object Model is still using unmanaged code
 Code Analyses tools can help, but be aware of the coverage (MSOCAF,
FXCop, SPDispose, SPCop)
 The Service Locator and Repository pattern can decouple the actual
implementation and hide complexity in SharePoint data access code
 Fully understand the implementation of a SharePoint feature before you
actually use it – Be aware – Blogs can be wrong!
 Long running and resource intensive scripts need to dispose object as
well!

Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

48
Thank You!
01010100 01101000 01100001 01101110
01101011 00100000 01011001 01101111
01110101 0100001

Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

49
Donald Hessing
 Thought Leader SharePoint @Capgemini
 Microsoft Certified Master for SharePoint
 Contact me:
 @dhessing
 donald.hessing@capgemini.com
 http://nl.linkedin.com/pub/donald-hessing/4/250/924

Presentation Title | Date
Copyright © Capgemini 2012. All Rights Reserved

50
SPCA2013 - SharePoint Nightmares - Coding Patterns and Practices
SPCA2013 - SharePoint Nightmares - Coding Patterns and Practices

Contenu connexe

Tendances

The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...SPTechCon
 
Sp administration-training-prism
Sp administration-training-prismSp administration-training-prism
Sp administration-training-prismThuan Ng
 
O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...
O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...
O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...NCCOMMS
 
Client Object Model and REST Improvements in SharePoint 2013
Client Object Model and REST Improvements in SharePoint 2013Client Object Model and REST Improvements in SharePoint 2013
Client Object Model and REST Improvements in SharePoint 2013Ejada
 
Modern development paradigms
Modern development paradigmsModern development paradigms
Modern development paradigmsIvano Malavolta
 
Integrating SharePoint 2010 and Visual Studio Lightswitch
Integrating SharePoint 2010 and Visual Studio LightswitchIntegrating SharePoint 2010 and Visual Studio Lightswitch
Integrating SharePoint 2010 and Visual Studio LightswitchRob Windsor
 
O365Con18 - Reach for the Cloud Build Solutions with the Power of Microsoft G...
O365Con18 - Reach for the Cloud Build Solutions with the Power of Microsoft G...O365Con18 - Reach for the Cloud Build Solutions with the Power of Microsoft G...
O365Con18 - Reach for the Cloud Build Solutions with the Power of Microsoft G...NCCOMMS
 
App Model For SharePoint 2013
App Model For SharePoint 2013App Model For SharePoint 2013
App Model For SharePoint 2013Toni Il Caiser
 
HTML5: the new frontier of the web
HTML5: the new frontier of the webHTML5: the new frontier of the web
HTML5: the new frontier of the webIvano Malavolta
 
Getting Started with SharePoint Development
Getting Started with SharePoint DevelopmentGetting Started with SharePoint Development
Getting Started with SharePoint DevelopmentChakkaradeep Chandran
 
Taking SharePoint 2010 Offline - European Best Practices Conference
Taking SharePoint 2010 Offline - European Best Practices ConferenceTaking SharePoint 2010 Offline - European Best Practices Conference
Taking SharePoint 2010 Offline - European Best Practices ConferenceGus Fraser
 
Developing Web Sites and Services using Visual Studio 2013
Developing Web Sites and Services using Visual Studio 2013Developing Web Sites and Services using Visual Studio 2013
Developing Web Sites and Services using Visual Studio 2013Microsoft Visual Studio
 
[Vochten/Harbar] SharePoint Server On Premises & Hybrid PowerClass
[Vochten/Harbar] SharePoint Server On Premises & Hybrid PowerClass[Vochten/Harbar] SharePoint Server On Premises & Hybrid PowerClass
[Vochten/Harbar] SharePoint Server On Premises & Hybrid PowerClassEuropean Collaboration Summit
 
Automating SQL Server Database Creation for SharePoint
Automating SQL Server Database Creation for SharePointAutomating SQL Server Database Creation for SharePoint
Automating SQL Server Database Creation for SharePointTalbott Crowell
 
Drupal Commerce, DrupalCamp Colorado 2010
Drupal Commerce, DrupalCamp Colorado 2010Drupal Commerce, DrupalCamp Colorado 2010
Drupal Commerce, DrupalCamp Colorado 2010Ryan Szrama
 
O365 Saturday - Deepdive SharePoint Client Side Rendering
O365 Saturday - Deepdive SharePoint Client Side RenderingO365 Saturday - Deepdive SharePoint Client Side Rendering
O365 Saturday - Deepdive SharePoint Client Side RenderingRiwut Libinuko
 
Introduction to the SharePoint Client Object Model and REST API
Introduction to the SharePoint Client Object Model and REST APIIntroduction to the SharePoint Client Object Model and REST API
Introduction to the SharePoint Client Object Model and REST APIRob Windsor
 

Tendances (20)

The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
 
Sp administration-training-prism
Sp administration-training-prismSp administration-training-prism
Sp administration-training-prism
 
O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...
O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...
O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...
 
Access & SharePoint
Access & SharePointAccess & SharePoint
Access & SharePoint
 
Client Object Model and REST Improvements in SharePoint 2013
Client Object Model and REST Improvements in SharePoint 2013Client Object Model and REST Improvements in SharePoint 2013
Client Object Model and REST Improvements in SharePoint 2013
 
Modern development paradigms
Modern development paradigmsModern development paradigms
Modern development paradigms
 
Integrating SharePoint 2010 and Visual Studio Lightswitch
Integrating SharePoint 2010 and Visual Studio LightswitchIntegrating SharePoint 2010 and Visual Studio Lightswitch
Integrating SharePoint 2010 and Visual Studio Lightswitch
 
O365Con18 - Reach for the Cloud Build Solutions with the Power of Microsoft G...
O365Con18 - Reach for the Cloud Build Solutions with the Power of Microsoft G...O365Con18 - Reach for the Cloud Build Solutions with the Power of Microsoft G...
O365Con18 - Reach for the Cloud Build Solutions with the Power of Microsoft G...
 
App Model For SharePoint 2013
App Model For SharePoint 2013App Model For SharePoint 2013
App Model For SharePoint 2013
 
HTML5: the new frontier of the web
HTML5: the new frontier of the webHTML5: the new frontier of the web
HTML5: the new frontier of the web
 
Word on the Server
Word on the ServerWord on the Server
Word on the Server
 
Getting Started with SharePoint Development
Getting Started with SharePoint DevelopmentGetting Started with SharePoint Development
Getting Started with SharePoint Development
 
SharePoint 2013 REST and CSOM
SharePoint 2013 REST  and CSOMSharePoint 2013 REST  and CSOM
SharePoint 2013 REST and CSOM
 
Taking SharePoint 2010 Offline - European Best Practices Conference
Taking SharePoint 2010 Offline - European Best Practices ConferenceTaking SharePoint 2010 Offline - European Best Practices Conference
Taking SharePoint 2010 Offline - European Best Practices Conference
 
Developing Web Sites and Services using Visual Studio 2013
Developing Web Sites and Services using Visual Studio 2013Developing Web Sites and Services using Visual Studio 2013
Developing Web Sites and Services using Visual Studio 2013
 
[Vochten/Harbar] SharePoint Server On Premises & Hybrid PowerClass
[Vochten/Harbar] SharePoint Server On Premises & Hybrid PowerClass[Vochten/Harbar] SharePoint Server On Premises & Hybrid PowerClass
[Vochten/Harbar] SharePoint Server On Premises & Hybrid PowerClass
 
Automating SQL Server Database Creation for SharePoint
Automating SQL Server Database Creation for SharePointAutomating SQL Server Database Creation for SharePoint
Automating SQL Server Database Creation for SharePoint
 
Drupal Commerce, DrupalCamp Colorado 2010
Drupal Commerce, DrupalCamp Colorado 2010Drupal Commerce, DrupalCamp Colorado 2010
Drupal Commerce, DrupalCamp Colorado 2010
 
O365 Saturday - Deepdive SharePoint Client Side Rendering
O365 Saturday - Deepdive SharePoint Client Side RenderingO365 Saturday - Deepdive SharePoint Client Side Rendering
O365 Saturday - Deepdive SharePoint Client Side Rendering
 
Introduction to the SharePoint Client Object Model and REST API
Introduction to the SharePoint Client Object Model and REST APIIntroduction to the SharePoint Client Object Model and REST API
Introduction to the SharePoint Client Object Model and REST API
 

Similaire à SPCA2013 - SharePoint Nightmares - Coding Patterns and Practices

Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...
Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...
Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...Sparkhound Inc.
 
Spstc2011 managed metadata real world
Spstc2011 managed metadata real worldSpstc2011 managed metadata real world
Spstc2011 managed metadata real worldAtul Chhoda
 
Spstc2011 managed metadata real world
Spstc2011 managed metadata real worldSpstc2011 managed metadata real world
Spstc2011 managed metadata real worldAtul Chhoda
 
SharePoint Saturday Sacramento 2013 SharePoint Apps
SharePoint Saturday Sacramento 2013 SharePoint AppsSharePoint Saturday Sacramento 2013 SharePoint Apps
SharePoint Saturday Sacramento 2013 SharePoint AppsRyan Schouten
 
Wcf data services
Wcf data servicesWcf data services
Wcf data servicesEyal Vardi
 
Intro to PowerShell
Intro to PowerShellIntro to PowerShell
Intro to PowerShellAdam Preston
 
The SharePoint & jQuery Guide
The SharePoint & jQuery GuideThe SharePoint & jQuery Guide
The SharePoint & jQuery GuideMark Rackley
 
The SharePoint and jQuery Guide by Mark Rackley - SPTechCon
The SharePoint and jQuery Guide by Mark Rackley - SPTechConThe SharePoint and jQuery Guide by Mark Rackley - SPTechCon
The SharePoint and jQuery Guide by Mark Rackley - SPTechConSPTechCon
 
Best practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata APIBest practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata APISanchit Dua
 
Design and Development performance considerations
Design and Development performance considerationsDesign and Development performance considerations
Design and Development performance considerationsElaine Van Bergen
 
Decomposing the Monolith using modern-day .NET and a touch of microservices
Decomposing the Monolith using modern-day .NET and a touch of microservicesDecomposing the Monolith using modern-day .NET and a touch of microservices
Decomposing the Monolith using modern-day .NET and a touch of microservicesDennis Doomen
 
ADO.NET Data Services
ADO.NET Data ServicesADO.NET Data Services
ADO.NET Data Servicesukdpe
 
Onion Architecture with S#arp
Onion Architecture with S#arpOnion Architecture with S#arp
Onion Architecture with S#arpGary Pedretti
 
Introduction to PowerShell - Be a PowerShell Hero - SPFest workshop
Introduction to PowerShell - Be a PowerShell Hero - SPFest workshopIntroduction to PowerShell - Be a PowerShell Hero - SPFest workshop
Introduction to PowerShell - Be a PowerShell Hero - SPFest workshopMichael Blumenthal (Microsoft MVP)
 
Best practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata APIBest practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata APISanchit Dua
 
Salesforce meetup | Lightning Web Component
Salesforce meetup | Lightning Web ComponentSalesforce meetup | Lightning Web Component
Salesforce meetup | Lightning Web ComponentAccenture Hungary
 
[DataCon.TW 2018] Metadata Store: Generalized Entity Database for Intelligenc...
[DataCon.TW 2018] Metadata Store: Generalized Entity Database for Intelligenc...[DataCon.TW 2018] Metadata Store: Generalized Entity Database for Intelligenc...
[DataCon.TW 2018] Metadata Store: Generalized Entity Database for Intelligenc...Jeff Hung
 
Intro to SharePoint + PowerShell
Intro to SharePoint + PowerShellIntro to SharePoint + PowerShell
Intro to SharePoint + PowerShellRyan Dennis
 

Similaire à SPCA2013 - SharePoint Nightmares - Coding Patterns and Practices (20)

Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...
Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...
Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...
 
Spstc2011 managed metadata real world
Spstc2011 managed metadata real worldSpstc2011 managed metadata real world
Spstc2011 managed metadata real world
 
Spstc2011 managed metadata real world
Spstc2011 managed metadata real worldSpstc2011 managed metadata real world
Spstc2011 managed metadata real world
 
SharePoint Saturday Sacramento 2013 SharePoint Apps
SharePoint Saturday Sacramento 2013 SharePoint AppsSharePoint Saturday Sacramento 2013 SharePoint Apps
SharePoint Saturday Sacramento 2013 SharePoint Apps
 
Wcf data services
Wcf data servicesWcf data services
Wcf data services
 
Intro to PowerShell
Intro to PowerShellIntro to PowerShell
Intro to PowerShell
 
The SharePoint & jQuery Guide
The SharePoint & jQuery GuideThe SharePoint & jQuery Guide
The SharePoint & jQuery Guide
 
The SharePoint and jQuery Guide by Mark Rackley - SPTechCon
The SharePoint and jQuery Guide by Mark Rackley - SPTechConThe SharePoint and jQuery Guide by Mark Rackley - SPTechCon
The SharePoint and jQuery Guide by Mark Rackley - SPTechCon
 
Best practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata APIBest practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata API
 
Design and Development performance considerations
Design and Development performance considerationsDesign and Development performance considerations
Design and Development performance considerations
 
Decomposing the Monolith using modern-day .NET and a touch of microservices
Decomposing the Monolith using modern-day .NET and a touch of microservicesDecomposing the Monolith using modern-day .NET and a touch of microservices
Decomposing the Monolith using modern-day .NET and a touch of microservices
 
ADO.NET Data Services
ADO.NET Data ServicesADO.NET Data Services
ADO.NET Data Services
 
Onion Architecture with S#arp
Onion Architecture with S#arpOnion Architecture with S#arp
Onion Architecture with S#arp
 
Introduction to PowerShell - Be a PowerShell Hero - SPFest workshop
Introduction to PowerShell - Be a PowerShell Hero - SPFest workshopIntroduction to PowerShell - Be a PowerShell Hero - SPFest workshop
Introduction to PowerShell - Be a PowerShell Hero - SPFest workshop
 
Best practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata APIBest practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata API
 
Salesforce meetup | Lightning Web Component
Salesforce meetup | Lightning Web ComponentSalesforce meetup | Lightning Web Component
Salesforce meetup | Lightning Web Component
 
[DataCon.TW 2018] Metadata Store: Generalized Entity Database for Intelligenc...
[DataCon.TW 2018] Metadata Store: Generalized Entity Database for Intelligenc...[DataCon.TW 2018] Metadata Store: Generalized Entity Database for Intelligenc...
[DataCon.TW 2018] Metadata Store: Generalized Entity Database for Intelligenc...
 
Sightly_techInsight
Sightly_techInsightSightly_techInsight
Sightly_techInsight
 
Intro to SharePoint + PowerShell
Intro to SharePoint + PowerShellIntro to SharePoint + PowerShell
Intro to SharePoint + PowerShell
 
L04 base patterns
L04 base patternsL04 base patterns
L04 base patterns
 

Plus de NCCOMMS

O365Con19 - UI:UX 101 Learn How to Design Custom Experiences for SharePoint -...
O365Con19 - UI:UX 101 Learn How to Design Custom Experiences for SharePoint -...O365Con19 - UI:UX 101 Learn How to Design Custom Experiences for SharePoint -...
O365Con19 - UI:UX 101 Learn How to Design Custom Experiences for SharePoint -...NCCOMMS
 
O365Con19 - Model-driven Apps or Canvas Apps? - Rick Bakker
O365Con19 - Model-driven Apps or Canvas Apps? - Rick BakkerO365Con19 - Model-driven Apps or Canvas Apps? - Rick Bakker
O365Con19 - Model-driven Apps or Canvas Apps? - Rick BakkerNCCOMMS
 
O365Con19 - Office 365 Groups Surviving the Real World - Jasper Oosterveld
O365Con19 - Office 365 Groups Surviving the Real World - Jasper OosterveldO365Con19 - Office 365 Groups Surviving the Real World - Jasper Oosterveld
O365Con19 - Office 365 Groups Surviving the Real World - Jasper OosterveldNCCOMMS
 
O365Con19 - Developing Timerjob and Eventhandler Equivalents - Adis Jugo
O365Con19 - Developing Timerjob and Eventhandler Equivalents - Adis JugoO365Con19 - Developing Timerjob and Eventhandler Equivalents - Adis Jugo
O365Con19 - Developing Timerjob and Eventhandler Equivalents - Adis JugoNCCOMMS
 
O365Con19 - Sharepoint with (Artificial) Intelligence - Adis Jugo
O365Con19 - Sharepoint with (Artificial) Intelligence - Adis JugoO365Con19 - Sharepoint with (Artificial) Intelligence - Adis Jugo
O365Con19 - Sharepoint with (Artificial) Intelligence - Adis JugoNCCOMMS
 
O365Con19 - What Do You Mean 90 days Isn't Enough - Paul Hunt
O365Con19 - What Do You Mean 90 days Isn't Enough - Paul HuntO365Con19 - What Do You Mean 90 days Isn't Enough - Paul Hunt
O365Con19 - What Do You Mean 90 days Isn't Enough - Paul HuntNCCOMMS
 
O365Con19 - Tips and Tricks for Complex Migrations to SharePoint Online - And...
O365Con19 - Tips and Tricks for Complex Migrations to SharePoint Online - And...O365Con19 - Tips and Tricks for Complex Migrations to SharePoint Online - And...
O365Con19 - Tips and Tricks for Complex Migrations to SharePoint Online - And...NCCOMMS
 
O365Con19 - Start Developing Teams Tabs and SharePoint Webparts with SPFX - O...
O365Con19 - Start Developing Teams Tabs and SharePoint Webparts with SPFX - O...O365Con19 - Start Developing Teams Tabs and SharePoint Webparts with SPFX - O...
O365Con19 - Start Developing Teams Tabs and SharePoint Webparts with SPFX - O...NCCOMMS
 
O365Con19 - Start Your Journey from Skype for Business to Teams - Sasja Beere...
O365Con19 - Start Your Journey from Skype for Business to Teams - Sasja Beere...O365Con19 - Start Your Journey from Skype for Business to Teams - Sasja Beere...
O365Con19 - Start Your Journey from Skype for Business to Teams - Sasja Beere...NCCOMMS
 
O365Con19 - Lets Get Started with Azure Container Instances - Jussi Roine
O365Con19 - Lets Get Started with Azure Container Instances - Jussi RoineO365Con19 - Lets Get Started with Azure Container Instances - Jussi Roine
O365Con19 - Lets Get Started with Azure Container Instances - Jussi RoineNCCOMMS
 
O365Con19 - Azure Blackbelt - Jussi Roine
O365Con19 - Azure Blackbelt - Jussi RoineO365Con19 - Azure Blackbelt - Jussi Roine
O365Con19 - Azure Blackbelt - Jussi RoineNCCOMMS
 
O365Con19 - Customise the UI in Modern SharePoint Workspaces - Corinna Lins
O365Con19 - Customise the UI in Modern SharePoint Workspaces - Corinna LinsO365Con19 - Customise the UI in Modern SharePoint Workspaces - Corinna Lins
O365Con19 - Customise the UI in Modern SharePoint Workspaces - Corinna LinsNCCOMMS
 
O365Con19 - Be The Protagonist of Your Modern Workplace - Corinna Lins
O365Con19 - Be The Protagonist of Your Modern Workplace - Corinna LinsO365Con19 - Be The Protagonist of Your Modern Workplace - Corinna Lins
O365Con19 - Be The Protagonist of Your Modern Workplace - Corinna LinsNCCOMMS
 
O365Con19 - How to Really Manage all your Tasks Across Microsoft 365 - Luise ...
O365Con19 - How to Really Manage all your Tasks Across Microsoft 365 - Luise ...O365Con19 - How to Really Manage all your Tasks Across Microsoft 365 - Luise ...
O365Con19 - How to Really Manage all your Tasks Across Microsoft 365 - Luise ...NCCOMMS
 
O365Con19 - Sharing Code Efficiently in your Organisation - Elio Struyf
O365Con19 - Sharing Code Efficiently in your Organisation - Elio StruyfO365Con19 - Sharing Code Efficiently in your Organisation - Elio Struyf
O365Con19 - Sharing Code Efficiently in your Organisation - Elio StruyfNCCOMMS
 
O365Con19 - Things I've Learned While Building a Product on SharePoint Modern...
O365Con19 - Things I've Learned While Building a Product on SharePoint Modern...O365Con19 - Things I've Learned While Building a Product on SharePoint Modern...
O365Con19 - Things I've Learned While Building a Product on SharePoint Modern...NCCOMMS
 
O365Con19 - Keep Control of Your Data with AIP and CA - Bram de Jager
O365Con19 - Keep Control of Your Data with AIP and CA - Bram de JagerO365Con19 - Keep Control of Your Data with AIP and CA - Bram de Jager
O365Con19 - Keep Control of Your Data with AIP and CA - Bram de JagerNCCOMMS
 
O365Con19 - Kaizala a Dive Into the Unknown - Rick van Rousselt
O365Con19 - Kaizala a Dive Into the Unknown - Rick van RousseltO365Con19 - Kaizala a Dive Into the Unknown - Rick van Rousselt
O365Con19 - Kaizala a Dive Into the Unknown - Rick van RousseltNCCOMMS
 
O365Con19 - How to Inspire Users to Unstick from Email - Luise Freese
O365Con19 - How to Inspire Users to Unstick from Email - Luise FreeseO365Con19 - How to Inspire Users to Unstick from Email - Luise Freese
O365Con19 - How to Inspire Users to Unstick from Email - Luise FreeseNCCOMMS
 
O365Con19 - O365 Identity Management and The Golden Config - Chris Goosen
O365Con19 - O365 Identity Management and The Golden Config - Chris GoosenO365Con19 - O365 Identity Management and The Golden Config - Chris Goosen
O365Con19 - O365 Identity Management and The Golden Config - Chris GoosenNCCOMMS
 

Plus de NCCOMMS (20)

O365Con19 - UI:UX 101 Learn How to Design Custom Experiences for SharePoint -...
O365Con19 - UI:UX 101 Learn How to Design Custom Experiences for SharePoint -...O365Con19 - UI:UX 101 Learn How to Design Custom Experiences for SharePoint -...
O365Con19 - UI:UX 101 Learn How to Design Custom Experiences for SharePoint -...
 
O365Con19 - Model-driven Apps or Canvas Apps? - Rick Bakker
O365Con19 - Model-driven Apps or Canvas Apps? - Rick BakkerO365Con19 - Model-driven Apps or Canvas Apps? - Rick Bakker
O365Con19 - Model-driven Apps or Canvas Apps? - Rick Bakker
 
O365Con19 - Office 365 Groups Surviving the Real World - Jasper Oosterveld
O365Con19 - Office 365 Groups Surviving the Real World - Jasper OosterveldO365Con19 - Office 365 Groups Surviving the Real World - Jasper Oosterveld
O365Con19 - Office 365 Groups Surviving the Real World - Jasper Oosterveld
 
O365Con19 - Developing Timerjob and Eventhandler Equivalents - Adis Jugo
O365Con19 - Developing Timerjob and Eventhandler Equivalents - Adis JugoO365Con19 - Developing Timerjob and Eventhandler Equivalents - Adis Jugo
O365Con19 - Developing Timerjob and Eventhandler Equivalents - Adis Jugo
 
O365Con19 - Sharepoint with (Artificial) Intelligence - Adis Jugo
O365Con19 - Sharepoint with (Artificial) Intelligence - Adis JugoO365Con19 - Sharepoint with (Artificial) Intelligence - Adis Jugo
O365Con19 - Sharepoint with (Artificial) Intelligence - Adis Jugo
 
O365Con19 - What Do You Mean 90 days Isn't Enough - Paul Hunt
O365Con19 - What Do You Mean 90 days Isn't Enough - Paul HuntO365Con19 - What Do You Mean 90 days Isn't Enough - Paul Hunt
O365Con19 - What Do You Mean 90 days Isn't Enough - Paul Hunt
 
O365Con19 - Tips and Tricks for Complex Migrations to SharePoint Online - And...
O365Con19 - Tips and Tricks for Complex Migrations to SharePoint Online - And...O365Con19 - Tips and Tricks for Complex Migrations to SharePoint Online - And...
O365Con19 - Tips and Tricks for Complex Migrations to SharePoint Online - And...
 
O365Con19 - Start Developing Teams Tabs and SharePoint Webparts with SPFX - O...
O365Con19 - Start Developing Teams Tabs and SharePoint Webparts with SPFX - O...O365Con19 - Start Developing Teams Tabs and SharePoint Webparts with SPFX - O...
O365Con19 - Start Developing Teams Tabs and SharePoint Webparts with SPFX - O...
 
O365Con19 - Start Your Journey from Skype for Business to Teams - Sasja Beere...
O365Con19 - Start Your Journey from Skype for Business to Teams - Sasja Beere...O365Con19 - Start Your Journey from Skype for Business to Teams - Sasja Beere...
O365Con19 - Start Your Journey from Skype for Business to Teams - Sasja Beere...
 
O365Con19 - Lets Get Started with Azure Container Instances - Jussi Roine
O365Con19 - Lets Get Started with Azure Container Instances - Jussi RoineO365Con19 - Lets Get Started with Azure Container Instances - Jussi Roine
O365Con19 - Lets Get Started with Azure Container Instances - Jussi Roine
 
O365Con19 - Azure Blackbelt - Jussi Roine
O365Con19 - Azure Blackbelt - Jussi RoineO365Con19 - Azure Blackbelt - Jussi Roine
O365Con19 - Azure Blackbelt - Jussi Roine
 
O365Con19 - Customise the UI in Modern SharePoint Workspaces - Corinna Lins
O365Con19 - Customise the UI in Modern SharePoint Workspaces - Corinna LinsO365Con19 - Customise the UI in Modern SharePoint Workspaces - Corinna Lins
O365Con19 - Customise the UI in Modern SharePoint Workspaces - Corinna Lins
 
O365Con19 - Be The Protagonist of Your Modern Workplace - Corinna Lins
O365Con19 - Be The Protagonist of Your Modern Workplace - Corinna LinsO365Con19 - Be The Protagonist of Your Modern Workplace - Corinna Lins
O365Con19 - Be The Protagonist of Your Modern Workplace - Corinna Lins
 
O365Con19 - How to Really Manage all your Tasks Across Microsoft 365 - Luise ...
O365Con19 - How to Really Manage all your Tasks Across Microsoft 365 - Luise ...O365Con19 - How to Really Manage all your Tasks Across Microsoft 365 - Luise ...
O365Con19 - How to Really Manage all your Tasks Across Microsoft 365 - Luise ...
 
O365Con19 - Sharing Code Efficiently in your Organisation - Elio Struyf
O365Con19 - Sharing Code Efficiently in your Organisation - Elio StruyfO365Con19 - Sharing Code Efficiently in your Organisation - Elio Struyf
O365Con19 - Sharing Code Efficiently in your Organisation - Elio Struyf
 
O365Con19 - Things I've Learned While Building a Product on SharePoint Modern...
O365Con19 - Things I've Learned While Building a Product on SharePoint Modern...O365Con19 - Things I've Learned While Building a Product on SharePoint Modern...
O365Con19 - Things I've Learned While Building a Product on SharePoint Modern...
 
O365Con19 - Keep Control of Your Data with AIP and CA - Bram de Jager
O365Con19 - Keep Control of Your Data with AIP and CA - Bram de JagerO365Con19 - Keep Control of Your Data with AIP and CA - Bram de Jager
O365Con19 - Keep Control of Your Data with AIP and CA - Bram de Jager
 
O365Con19 - Kaizala a Dive Into the Unknown - Rick van Rousselt
O365Con19 - Kaizala a Dive Into the Unknown - Rick van RousseltO365Con19 - Kaizala a Dive Into the Unknown - Rick van Rousselt
O365Con19 - Kaizala a Dive Into the Unknown - Rick van Rousselt
 
O365Con19 - How to Inspire Users to Unstick from Email - Luise Freese
O365Con19 - How to Inspire Users to Unstick from Email - Luise FreeseO365Con19 - How to Inspire Users to Unstick from Email - Luise Freese
O365Con19 - How to Inspire Users to Unstick from Email - Luise Freese
 
O365Con19 - O365 Identity Management and The Golden Config - Chris Goosen
O365Con19 - O365 Identity Management and The Golden Config - Chris GoosenO365Con19 - O365 Identity Management and The Golden Config - Chris Goosen
O365Con19 - O365 Identity Management and The Golden Config - Chris Goosen
 

Dernier

Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 

Dernier (20)

Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 

SPCA2013 - SharePoint Nightmares - Coding Patterns and Practices

  • 1.
  • 2. SharePoint Nightmares Coding Patterns and Practices Donald Hessing | @dhessing
  • 3. Who am I? Donald Hessing  Principal Consultant | Thought Leader SharePoint @Capgemini Netherlands  (Virtual) Technology Solution Professional for Microsoft  Work full time on SharePoint since 2007  donald.hessing@capgemini.com | @dhessing Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 3
  • 4. Agenda 1. 2. 3. 4. 5. SharePoint Anti-Patterns Data Access Dispose and PowerShell REST versus CSOM SharePoint provisioning techniques Demos:  Service Locator Pattern 2010/2013  PowerShell Dispose Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 4
  • 6.
  • 7. True or False web.Lists[“Pages”] == web.Lists[“Pages”] Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 7
  • 8.
  • 9. Anti Pattern SPList[] 1: web.Lists[“Events”].EnableAttachments = false; 2: web.Lists[“Events”].Update(); SPList object in line 1 is not the same as in line 2 1: SPList list= web.Lists[“Events”]; 2: list.EnableAttachments = false; 3: list.Update(); Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 9
  • 11. SP.SPRequest Microsoft.SharePoint.dll SPRequest SPSite _m_Request : SPRequest Unmanaged OWSSVR.DLL SP.SPRequest (Unmanaged) ClassID: BDEADEE2-C265-11D0-BCED-00A0C90AB50F Unmanaged Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 11
  • 12. SPRequest  SPRequest is a wrapper for unmanaged class SP.SPRequest  SP.SPRequest is a COM Object that is coming from SharePoint Portal Services back in 2001  Most retrieval and write operations to SharePoint (SPSite, SPWeb, SPList) are still implemented by SP.SPRequest OWSSVR.DLL SP.SPRequest (Unmanaged) ClassID: BDEADEE2-C265-11D0-BCED-00A0C90AB50F More: http://hristopavlov.wordpress.com/2009/01/19/understanding-sharepoint-sprequest/ Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 12
  • 13. Anti Pattern SPList[] SPS.SPRequest .EnabledAttachments (false) 1: web.Lists[“Events”].EnableAttachments = false; 2: web.Lists[“Events”].Update(); SPS.SPRequest .EnabledAttachments (true) Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 13
  • 14. Anti-Pattern SPList.Items Show the items of from SPList SPList list = SPContext.Current.List; for(int i=0;i<100 && i<list.Items.Count;i++) { SPListItem listItem = list.Items[i]; ShowTitle(listItem["Title"].ToString()); } Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 14
  • 15. Good or Bad? Show the items of from SPList SPList list = SPContext.Current.List; for(int i=0;i<100 && i<list.ItemsCount;i++) { …. } SPList.ItemCount is an optimized property for performance reasons. This property can occasionally return unexpected results. If the precise number is required (in loops) than the SPList.Items.Count property should be used to preven index out of range exceptions! Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 15
  • 16. Improved Pattern SPQuery query = new SPQuery(); query.RowLimit = 100; query. ViewFields = “<FieldRef Name='Title' />”; query. ViewFieldsOnly = true; SPListItemCollection items = SPContext.Current.List.GetItems(query); for (int i=0;i<items.Count;i++) { SPListItem listItem = items[i]; ShowTitle(listItem["Title"].ToString()); } Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 16
  • 17. Anti-Pattern SPList.Items Each call of .Items retrieves all items from the database! Not needed when:  SPList.Items[0], SPList.Items.Count  SPList.Items can’t benefit from indices SPList.Items can LOCK your content database When needed, sort the collection of SPList.Items in a SPListCollection variable Use SPQuery for list data retrieval (CAMLQueryBuilder) Use SPSiteDataQuery for cross list items  Use the RowLimit property of the query object Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 17
  • 18. Tools… See “Building a SP Factory” SharePoint 2013 SharePoint 2010  SPDisposeCheck.exe  MSOCAF 2010  FXContrib  SPCOP / SPCAF Foundation  FXCop  StyleCop  Visual Studio 2010 / 2012  MSOCAF 2013  SPCOP / SPCAF Foundation  FXCop – Custom Rules  StyleCop  Visual Studio 2012 / 2013 • • Only tool for SharePoint artefacts, metrics, feature dependency, managed code and C# analyses! Includes TFS and 3th Party integration (FXCop, JSLint,CAT.NET) Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 18
  • 19. (Remote) Event Receivers Do not use for… Remote Event Receivers  Setting Unique permissions on large  Remote event receivers are libraries or sites based on meta data or implemented as a webservice endpoint person hosted on-premise or Windows Azure.  Synchronize or mirroring solutions  NO Guaranteed delivery!  Mixing list data and relational data  NO Retry like normal messaging integrity solutions (some relational data infrastructure gives you stored in SQL Server)  If you need guaranteed delivery, it’s better to use the new workflow model! Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 19
  • 20. Inherited Permissions Web object 1 Document library object 1 Folder object 1 Item 1 object 1 Item 2 object + User 2 (Reader) 1 Item 3 object Scope 1 1 + User 3 (Full Control) + User 6 (Contributor) Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 20
  • 21. Fine Grained Permissions Scope 2 + User 5 (Reader) Web object 1 Document library object 1 Scope 3 2 Item 1 object + User 2 (Limited Access) + User 1 (Limited Access) Folder object 3 Item 2 object 4 Item 3 object + User 2 (Reader) 5 + User 1 (Contributor) Scope 4 Scope 1 + User 3 (Full Control) + User 6 (Contributor) + User 1 (Limited Access) + User 2 (Limited Access) + User 5 (Limited Access) + User 2 (Contributor) Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 21
  • 23.
  • 24.
  • 25. Tightly Coupled  The implementation of the Service needs to be available at compile time  The classes cannot be tested in isolation because they have direct references to the implementation (SPWeb, SPSite objects)  Class A can only be created when Service A implementation is finished Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 25
  • 26. The Service Locator Pattern  Class A can now be tested in Isolation as it doesn’t hold any depencies with the Service A Implementation  Class A is now loosely coupled to the Service Implementation Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 26
  • 27. Example Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 27
  • 28. DEMO Service Locator and Repository Pattern Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 28
  • 29. Benefits of these patterns  Service Locator Pattern  Decoupled dependency – Logger implementation can now easily be replaced  The service implementation can be tested in isolation by using a proxy (dummy data)  Repository Pattern  Central point to access data  Can modify the data layer (storage) without too much impact  Strongly typed access to the data  Microsoft Patterns and Practices Guide provides implementation for both patterns for SharePoint 2010  No specific version for SharePoint 2013 as for now Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 29
  • 31. Dispose() and PowerShell SharePoint Management Shell ensures disposal of all objects in the preceding pipeline sequence Command or single line Pipeline runs a single Thread Get-SPWebApplication | Get-SPSite -Limit All | Get-SPWeb -Limit All | Select Title Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 31
  • 32. SharePoint Management Shell  SharePoint Management Shell is running multiple lines in the same thread, ensuring thread safety of the SharePoint unmanaged code  This is achieved by setting the ThreadOptions=‘ReuseThread’  SharePoint Management Shell start-up script: $ver = $host | select version if ($ver.Version.Major -gt 1) {$Host.Runspace.ThreadOptions = “ReuseThread”} Add-PsSnapin Microsoft.SharePoint.PowerShell Set-location $home Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 32
  • 33. Multi-line  PowerShell that contains multiple lines require manually disposing of objects  No Help from PowerShell as it doesn’t know when to dispose objects $site = Get-SPSite "http://sp2013" Foreach ($web in $site.AllWebs) { Write-Host $web.Title } Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 33
  • 34. Start-SPAssignment & Stop-SPAssignment  Introduced in SharePoint 2010 to overcome memory pressure  Manages objects for the purpose of proper disposal  SPWeb  SPSite  SPSiteAdministration Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 35
  • 35. SPAssignment - Global SCOPE Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 36
  • 36. SPAssignment Namespaces SCOPE SCOPE Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 37
  • 37. Why is this important?  PowerShell cannot claim leaked memory until process termination  Scripts that iterate large Web Applications and performs significant processing require memory management!  Batch jobs for Reporting (Versioning, Checked-out, Access, Boundaries) Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 38
  • 38. PowerShell - CSOM Roel Hans Bethlehem: “Extending PowerShell with CSOM” http://sponlinecmdlets.codeplex.com/ Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 39
  • 39. DEMO Service Locator and Repository Pattern SP2010 Service Locator SP2013 Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 40
  • 41. App-Model Support Hosting type SharePoint Hosted AutoHosted Provider Hosted SharePoint 2013 On Premises Windows Classic X X X Windows Claims √ X √ SAML Claims X X √** √ √ √ SharePoint Online / Office 365 Windows Claims • No support for the SharePoint Public app store as for now • SAML might requires additional configuration http://blogs.technet.com/b/speschka/archive/2012/12/07/using-sharepoint-apps-with-saml-and-fba-sites-in-sharepoint-2013.aspx Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 42
  • 43. REST versus CSOM SharePoint Foundation User Profile Search Taxonomy Feeds More… _api SharePoint Execute Query Client JavaScript Library Silverlight Library OData / REST .Net CLR Library Clients SP Hosted App Windows Phone Auto Hosted App SP Hosted App Windows 8 RT iOS, PHP, Ruby,etc Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 44
  • 44. Limitations REST  REST calls seems to be more chatty than JSOM  REST implementation is still a subset of CSOM Description REST JSOM Updating Content Types X √ Post to person news feed X/√ √ Large file upload √ X Batch updates X √ X/√ √ Supports jQuery, plugins √ X Environment independent √ X Well documented Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 45
  • 45.
  • 46. Links  http://spohelper.codeplex.com/  http://www.sharepointnutsandbolts.com/  http://blogs.technet.com/b/speschka/archive/2012/12/07/using-sharepointapps-with-saml-and-fba-sites-in-sharepoint-2013.aspx  http://www.shillier.com/default.aspx  http://www.slideshare.net/bobbyschang/sharepoint-permissions-worstpractices Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 47
  • 47. Key takeaways  SharePoint Server Side Object Model is still using unmanaged code  Code Analyses tools can help, but be aware of the coverage (MSOCAF, FXCop, SPDispose, SPCop)  The Service Locator and Repository pattern can decouple the actual implementation and hide complexity in SharePoint data access code  Fully understand the implementation of a SharePoint feature before you actually use it – Be aware – Blogs can be wrong!  Long running and resource intensive scripts need to dispose object as well! Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 48
  • 48. Thank You! 01010100 01101000 01100001 01101110 01101011 00100000 01011001 01101111 01110101 0100001 Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 49
  • 49. Donald Hessing  Thought Leader SharePoint @Capgemini  Microsoft Certified Master for SharePoint  Contact me:  @dhessing  donald.hessing@capgemini.com  http://nl.linkedin.com/pub/donald-hessing/4/250/924 Presentation Title | Date Copyright © Capgemini 2012. All Rights Reserved 50