SlideShare ist ein Scribd-Unternehmen logo
1 von 38
Downloaden Sie, um offline zu lesen
Hard learned SharePoint dev tips
SAHIL MALIK
WWW.WINSMARTS.COM
@SAHILMALIK

SHAREPOINT AND PROJECT CONFERENCE ADRIATICS 2013
ZAGREB, NOVEMBER 27-28 2013
sponsors
C:>whoami

11xMVP
15xAuthor
Pluralsight Author
Microsoft Metro Trainer
Funny and Honest

HTTP://BLAH.WINSMARTS.COM
@SAHILMALIK
Hard learned SharePoint dev tips
0945AM

Hard learned CSOM and REST

0345PM
Lists and Document Libraries
Lists live in SPWebs
dbo.AllLists
Primary Key for AllLists
Content Types – will make performance worse
tp_Fields
dbo.AllUserData
My Test List
Example
Example 2
tp_ColumnSet
Sparse Columns
AllUserData
tp_ID

identify the list item

tp_GUID

To uniquely identify the list item

tp_ListId

To identify which list the item belongs to.

tp_SiteId

To identify which site the item belongs to. It is the value of ‘Id’ in ‘AllSites’ table

tp_RowOrdinal

Zero based ordinal index in the set of rows representing the list item

tp_Author

User who created the list item

tp_Editor

User who last edited the list item

tp_Modified

Modified date

tp_Created

Created date

tp_DeleteTransactionID

Not 0x if the item is in recycle bin

tp_IsCurrentVersion (bit)

1 or 0, identifying latest version

nvarchar1..64

Stores values of application fields of type nvarchar

ntext1..32

Stores application fields of type ntext

bit1..16

Application fields of type bit

datetime1..8

Application fields of type datetime
AllUserData
float 1..12

Application fields of type float

Int1..16

Application fields of type int

sql_variant1..8

Application fields of type sql_variant
AllUserData - takeaways
Now lets talk documents!
Test Data
How are documents stored?
Document Storage
DocStreams
Scientifically accurate picture of RBS
Document Storage – Lessons Learnt
Careful of iterators!

Avoids multiple calls to DB
Does not create SPListItemCollection over and over again
Number of Items in a list
SPQuery is your friend
2147483648

And its getting every single column!
Avoid reloading objects
SharePoint objects are not threadsafe!
Getting a list
proc_EnumLists
proc_MapUrlToListAndView
proc_EnumLists loads all information of all lists in the SPWeb object, and then does a .Title comparison to find the
list you need.
proc_MapUrlToListAndView finds the GUID for the associated list, and then loads the metadata for the list you
need.
Deleting Items
Good vs Evil
Evil

Good

SPList.Items.Count

SPList.ItemsCount

SPList.Items[Guid]

SPList.GetItemByUniqueId(Guid)

SPList.Items[Int32]

SPList.GetItemById(Int32)

SPList.Items.GetItemById(Int32)

SPList.GetItemById(Int32

SPList.Items.NumberOfFields

SPQuery + ViewFields

SPList.Items.ReorderItems

Use SPQuery.ListItemCollectionPosition to do paging

SPFolder.Files.Count

SPFolder.ItemCount
.Dispose
.Dispose
questions?
HTTP://BLAH.WINSMARTS.COM
@SAHILMALIK
thank you.
SHAREPOINT AND PROJECT CONFERENCE ADRIATICS 2013
ZAGREB, NOVEMBER 27-28 2013

Weitere ähnliche Inhalte

Andere mochten auch

Andere mochten auch (6)

To the cloud!
To the cloud!To the cloud!
To the cloud!
 
Project Server - Who can benefit from it and how?
Project Server - Who can benefit from it and how?Project Server - Who can benefit from it and how?
Project Server - Who can benefit from it and how?
 
Driving Social Business Transformation with The Microsoft Platform - Symon Ga...
Driving Social Business Transformation with The Microsoft Platform - Symon Ga...Driving Social Business Transformation with The Microsoft Platform - Symon Ga...
Driving Social Business Transformation with The Microsoft Platform - Symon Ga...
 
Solving Real World Challenges with Enterprise Search
Solving Real World Challenges with Enterprise SearchSolving Real World Challenges with Enterprise Search
Solving Real World Challenges with Enterprise Search
 
SharePoint Insanity Demystified
SharePoint Insanity DemystifiedSharePoint Insanity Demystified
SharePoint Insanity Demystified
 
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
 

Ähnlich wie Hard learned SharePoint development tips

Design And Implementation Of Web Service Testing Framework Mit Template
Design And Implementation Of Web Service Testing Framework Mit TemplateDesign And Implementation Of Web Service Testing Framework Mit Template
Design And Implementation Of Web Service Testing Framework Mit Template
reswin
 
Breaking down data silos with the open data protocol
Breaking down data silos with the open data protocolBreaking down data silos with the open data protocol
Breaking down data silos with the open data protocol
Woodruff Solutions LLC
 
Statements,joins and operators in sql by thanveer danish melayi(1)
Statements,joins and operators in sql by thanveer danish melayi(1)Statements,joins and operators in sql by thanveer danish melayi(1)
Statements,joins and operators in sql by thanveer danish melayi(1)
Muhammed Thanveer M
 

Ähnlich wie Hard learned SharePoint development tips (20)

MuleSoft London Community February 2020 - MuleSoft and OData
MuleSoft London Community February 2020 - MuleSoft and ODataMuleSoft London Community February 2020 - MuleSoft and OData
MuleSoft London Community February 2020 - MuleSoft and OData
 
Design And Implementation Of Web Service Testing Framework Mit Template
Design And Implementation Of Web Service Testing Framework Mit TemplateDesign And Implementation Of Web Service Testing Framework Mit Template
Design And Implementation Of Web Service Testing Framework Mit Template
 
Linq
LinqLinq
Linq
 
Everything you wanted to know about Dublin Core metadata
Everything you wanted to know about Dublin Core metadataEverything you wanted to know about Dublin Core metadata
Everything you wanted to know about Dublin Core metadata
 
Hatkit Project - Datafiddler
Hatkit Project - DatafiddlerHatkit Project - Datafiddler
Hatkit Project - Datafiddler
 
Breaking down data silos with the open data protocol
Breaking down data silos with the open data protocolBreaking down data silos with the open data protocol
Breaking down data silos with the open data protocol
 
Engineering Student MuleSoft Meetup#6 - Basic Understanding of DataWeave With...
Engineering Student MuleSoft Meetup#6 - Basic Understanding of DataWeave With...Engineering Student MuleSoft Meetup#6 - Basic Understanding of DataWeave With...
Engineering Student MuleSoft Meetup#6 - Basic Understanding of DataWeave With...
 
Ruby on Rails introduction
Ruby on Rails introduction Ruby on Rails introduction
Ruby on Rails introduction
 
Dynamic Language Performance
Dynamic Language PerformanceDynamic Language Performance
Dynamic Language Performance
 
Linq
LinqLinq
Linq
 
Linq
LinqLinq
Linq
 
Introduction to thymeleaf
Introduction to thymeleafIntroduction to thymeleaf
Introduction to thymeleaf
 
Of Lambdas and LINQ
Of Lambdas and LINQOf Lambdas and LINQ
Of Lambdas and LINQ
 
Wcf data services
Wcf data servicesWcf data services
Wcf data services
 
Dublin Core, the DCMI Abstract Model & DC Application Profiles
Dublin Core, the DCMI Abstract Model & DC Application ProfilesDublin Core, the DCMI Abstract Model & DC Application Profiles
Dublin Core, the DCMI Abstract Model & DC Application Profiles
 
The Glory of Rest
The Glory of RestThe Glory of Rest
The Glory of Rest
 
BCA IPU VB.NET UNIT-II
BCA IPU VB.NET UNIT-IIBCA IPU VB.NET UNIT-II
BCA IPU VB.NET UNIT-II
 
Architecture | Busy Java Developers Guide to NoSQL | Ted Neward
Architecture | Busy Java Developers Guide to NoSQL | Ted NewardArchitecture | Busy Java Developers Guide to NoSQL | Ted Neward
Architecture | Busy Java Developers Guide to NoSQL | Ted Neward
 
Statements,joins and operators in sql by thanveer danish melayi(1)
Statements,joins and operators in sql by thanveer danish melayi(1)Statements,joins and operators in sql by thanveer danish melayi(1)
Statements,joins and operators in sql by thanveer danish melayi(1)
 
Hard learned CSOM and REST tips
Hard learned CSOM and REST tipsHard learned CSOM and REST tips
Hard learned CSOM and REST tips
 

Mehr von SPC Adriatics

Mehr von SPC Adriatics (20)

How to secure your data in Office 365
How to secure your data in Office 365 How to secure your data in Office 365
How to secure your data in Office 365
 
Do you know, where your sensitive data is?
Do you know, where your sensitive data is?Do you know, where your sensitive data is?
Do you know, where your sensitive data is?
 
Securing Intellectual Property using Azure Rights Management Services
Securing Intellectual Property using Azure Rights Management ServicesSecuring Intellectual Property using Azure Rights Management Services
Securing Intellectual Property using Azure Rights Management Services
 
Creating Workflows in Project Online
Creating Workflows in Project OnlineCreating Workflows in Project Online
Creating Workflows in Project Online
 
Faster than a flash behind the scenes of patching SharePoint Online
Faster than a flash   behind the scenes of patching SharePoint OnlineFaster than a flash   behind the scenes of patching SharePoint Online
Faster than a flash behind the scenes of patching SharePoint Online
 
Role based views in Project and Resource Center
Role based views in Project and Resource CenterRole based views in Project and Resource Center
Role based views in Project and Resource Center
 
OneDrive, TwoDrive, Whiterive, BlueDrive (hahaha)
OneDrive, TwoDrive, Whiterive, BlueDrive (hahaha)OneDrive, TwoDrive, Whiterive, BlueDrive (hahaha)
OneDrive, TwoDrive, Whiterive, BlueDrive (hahaha)
 
SharePoint Governance and Compliance
SharePoint Governance and ComplianceSharePoint Governance and Compliance
SharePoint Governance and Compliance
 
From analyses to successful Implementation
From analyses to successful ImplementationFrom analyses to successful Implementation
From analyses to successful Implementation
 
The key to a successful Office 365 implementation is adoption
The key to a successful Office 365 implementation is adoptionThe key to a successful Office 365 implementation is adoption
The key to a successful Office 365 implementation is adoption
 
Office 365 Video
Office 365 VideoOffice 365 Video
Office 365 Video
 
10 Steps to be Successful with Enterprise Search
10 Steps to be Successful with Enterprise Search10 Steps to be Successful with Enterprise Search
10 Steps to be Successful with Enterprise Search
 
How the Cloud Changes Business Solution Design and Delivery
How the Cloud Changes Business Solution Design and DeliveryHow the Cloud Changes Business Solution Design and Delivery
How the Cloud Changes Business Solution Design and Delivery
 
Scaling SharePoint 2016 Farms with MinRole & Other Tools
Scaling SharePoint 2016 Farms with MinRole & Other ToolsScaling SharePoint 2016 Farms with MinRole & Other Tools
Scaling SharePoint 2016 Farms with MinRole & Other Tools
 
SharePoint 2013 Search Operations
SharePoint 2013 Search OperationsSharePoint 2013 Search Operations
SharePoint 2013 Search Operations
 
Office Online Server 2016 - a must for on-premises installation for SharePoin...
Office Online Server 2016 - a must for on-premises installation for SharePoin...Office Online Server 2016 - a must for on-premises installation for SharePoin...
Office Online Server 2016 - a must for on-premises installation for SharePoin...
 
Custom Code-The Missing Piece of the SharePoint Governance Puzzle
Custom Code-The Missing Piece of the SharePoint Governance PuzzleCustom Code-The Missing Piece of the SharePoint Governance Puzzle
Custom Code-The Missing Piece of the SharePoint Governance Puzzle
 
SharePoint 2016 Hybrid Sites Inside Out
SharePoint 2016 Hybrid Sites Inside OutSharePoint 2016 Hybrid Sites Inside Out
SharePoint 2016 Hybrid Sites Inside Out
 
Microsoft BI demystified: SharePoint 2016 BI or for PowerBI v2?
Microsoft BI demystified: SharePoint 2016 BI or for PowerBI v2?Microsoft BI demystified: SharePoint 2016 BI or for PowerBI v2?
Microsoft BI demystified: SharePoint 2016 BI or for PowerBI v2?
 
What's New for the BI workload in SharePoint 2016 and SQL Server 2016
What's New for the BI workload in SharePoint 2016 and SQL Server 2016What's New for the BI workload in SharePoint 2016 and SQL Server 2016
What's New for the BI workload in SharePoint 2016 and SQL Server 2016
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 

Hard learned SharePoint development tips