SlideShare a Scribd company logo
1 of 34
Best Practices and Avoiding Common Errors with SharePoint Development Ivan Sanders SharePoint Architect Microsoft SharePoint Server MVPDimension Solutions inc. ivan@dimension-si.com
Topics Data access Site objects Cross-site objects Data aggregation SharePoint trivia Questions and Answers
Data Access Site Objects
SharePoint Lists List data is stored in single UserInfo table for each content database List constructs are virtualized and non-relational (but you can create relationships programmatically) Lists are optimized for UI not for transactional data access Limited data types and data type instances
SharePoint Lists
Data Retrieval Use an indexer to return a single list item from the collection
Data Retrieval Use an indexer to return a single list item from the collection
Data Retrieval Looping operations in the object model are very resource intensive
Data Retrieval Design architecture to support application requirements Use CAML queries for targeted item selection Maintain SQL indexes for optimal query execution Manipulate item data using in-memory objects (SPListItemCollection, DataTable, <List>, XML) For extremely large data sets, segment data across multiple content databases
Data Presentation 2000 item limit guideline applies only to built-in list views NOT to list contents Extremely large list structures (10,000+ items) require custom web parts to display content Data-bound objects provide best performance XML + XSLT outperforms list view objects Page results to reduce rendering times Beware caching of large data sets in ViewState
Web Services Provide front-end for OM code Return list objects as XML Manipulating XML in memory is more efficient than repeated calls OM Require extensive text manipulation Beware column name differences and content formatting
Web Services SharePoint Emoticons (My Fav) 0;#   SP sticking its tongue out  (:-P) X0020 This_x0020_is_x0020_My_x0020_Favorite ows_ All Your Fields Are Belong to OWS -1001 Look!  Booleans can be anything!
Demo Using SharePoint Lists as a Data Source
Data Access Cross-Site Objects
CAML No native cross-site functionality Combine with recursive methods to create consolidated dataset Recurse list of site and list objects (XML, Delimited, GetSubwebsForCurrentUser, etc.) Store list items in ADO.NET object (DataTable, DataSet, etc.) Be aware of memory issues when using SPQuery to retrieve very large datasets
PortalSiteMapProvider MOSS only Optimized for repeated calls to same set of objects Use the GetCachedListItemsByQuery() method for cacheable items that do not change often Executes CAML Query without having to walk the collection of SPWeb objects List items must still be iterated using in-memory methods
Search Provides non-contextual item data within defined scope(s) Requires parsing potentially large number of results (XML or ResultTable) Scopes and queries must be managed to return desired results – no guarantee that default results will include the desired item(s) Access to contextual item data requires recursive object methods
Web Services Some methods provide multiple object support (lists, Webs, etc.) Results are non-contextual; however, most metadata is available in native methods Resultant XML must be parsed and manipulated XML may be consolidated and XPATH used in place of recursion Extensive/repetitive calls increase overhead on WFEs
Demo Retrieving SharePoint List Items from Multiple Site Collections using MOSS Search
Data Aggregation
Relational Data  SharePoint lists are inherently non-relational  Structure in Lists table Data in UserInfo table Fixed number of field elements Relationships must be created programmatically using combination of list definitions and ADO.NET, LINQ, etc.
ADO.NET Define list structures and primary/foreign keys Remember data type limitations Retrieve list objects via OM or Web Services Create relational DataSet objects, merge into single DataTable Use stand-beside DB for caching and native SQL queries
LINQ Simplifies programming Allows for normalized query language similar to T-SQL Performance impact is dictated by type of operation Lists expose XML which can be directly queried
Recursive Site Queries Avoid direct database queries Create Timer Job or Windows Service to execute recursion code Schedule for off-peak hours Store results in separate database Query against custom DB Batch bulk update tasks using Web services Avoid populating data warehouse via event handlers
Best Practices Site Objects – Use CAML to retrieve list objects Create custom web parts to display large datasets Cross-Site Objects – PortalSiteMapProvider and Search provide optimal performance External Objects SP to SP – Use web services Other – Employ least overhead-intensive method Data Aggregation – Relational list methods should be reserved for smaller datasets
SharePoint Trivia
Round 1: Lists are limited to 1,000,000 individual items
Round 2: You may omit the “ows_” prefix from field names in Object Model CAML queries
Round 3: Web services are more efficient at retrieving large datasets than CAML
Round 4: Executing a Full Text SQL Query against the search API returns a ResultTable object
Round 5: Using SPList.GetListAsDataTable() returns XML Encoded results
Q & A
Resources
Resources SharePoint 2007 Performance and Scalability White Paper http://blogs.msdn.com/sharepoint/archive/2008/06/17/belated-announcement-sharepoint-server-2007-scalability-and-performance-whitepaper-now-available.aspx Patterns and Practices Guidance http://www.codeplex.com/spg

More Related Content

More from Ivan Sanders

#OCSPUG SharePoint 2013 Best Practices
#OCSPUG SharePoint 2013 Best Practices#OCSPUG SharePoint 2013 Best Practices
#OCSPUG SharePoint 2013 Best PracticesIvan Sanders
 
O365 DEVCamp Los Angeles June 16, 2015 Module 06 Hook into SharePoint APIs wi...
O365 DEVCamp Los Angeles June 16, 2015 Module 06 Hook into SharePoint APIs wi...O365 DEVCamp Los Angeles June 16, 2015 Module 06 Hook into SharePoint APIs wi...
O365 DEVCamp Los Angeles June 16, 2015 Module 06 Hook into SharePoint APIs wi...Ivan Sanders
 
O365 DEVCamp Los Angeles June 16, 2015 Module 05 Hook into Apps for Office
  O365 DEVCamp Los Angeles June 16, 2015 Module 05 Hook into Apps for Office  O365 DEVCamp Los Angeles June 16, 2015 Module 05 Hook into Apps for Office
O365 DEVCamp Los Angeles June 16, 2015 Module 05 Hook into Apps for OfficeIvan Sanders
 
O365 DEVCamp Los Angeles June 16, 2015 Module 04 Hook into Office 365 APIs
O365 DEVCamp Los Angeles June 16, 2015 Module 04 Hook into Office 365 APIsO365 DEVCamp Los Angeles June 16, 2015 Module 04 Hook into Office 365 APIs
O365 DEVCamp Los Angeles June 16, 2015 Module 04 Hook into Office 365 APIsIvan Sanders
 
O365 DEVCamp Los Angeles June 16, 2015 Module 03 Hook into Apps for Sharepoint
O365 DEVCamp Los Angeles June 16, 2015 Module 03 Hook into Apps for SharepointO365 DEVCamp Los Angeles June 16, 2015 Module 03 Hook into Apps for Sharepoint
O365 DEVCamp Los Angeles June 16, 2015 Module 03 Hook into Apps for SharepointIvan Sanders
 
O365 DEVCamp Los Angeles June 16, 2015 Module 02 Setting up the Environments
O365 DEVCamp Los Angeles June 16, 2015 Module 02 Setting up the EnvironmentsO365 DEVCamp Los Angeles June 16, 2015 Module 02 Setting up the Environments
O365 DEVCamp Los Angeles June 16, 2015 Module 02 Setting up the EnvironmentsIvan Sanders
 
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
 
Practical Business Intelligence in SharePoint 2013 - Helsinki Finalnd
Practical Business Intelligence in SharePoint 2013 - Helsinki FinalndPractical Business Intelligence in SharePoint 2013 - Helsinki Finalnd
Practical Business Intelligence in SharePoint 2013 - Helsinki FinalndIvan Sanders
 
Real world business workflow with SharePoint designer 2013
Real world business workflow with SharePoint designer 2013Real world business workflow with SharePoint designer 2013
Real world business workflow with SharePoint designer 2013Ivan Sanders
 
Practical Business Intelligence with SharePoint 2013
Practical Business Intelligence with SharePoint 2013Practical Business Intelligence with SharePoint 2013
Practical Business Intelligence with SharePoint 2013Ivan Sanders
 
SharePoint 2013 Business Intelligence Demos to build your businesss 2.0
SharePoint 2013 Business Intelligence Demos to build your businesss 2.0SharePoint 2013 Business Intelligence Demos to build your businesss 2.0
SharePoint 2013 Business Intelligence Demos to build your businesss 2.0Ivan Sanders
 
Self-Service Business Intelligence in SharePoint 2013
Self-Service Business Intelligence in SharePoint 2013Self-Service Business Intelligence in SharePoint 2013
Self-Service Business Intelligence in SharePoint 2013Ivan Sanders
 
Practical businerss intelligence in share point 2013
Practical businerss intelligence in share point 2013Practical businerss intelligence in share point 2013
Practical businerss intelligence in share point 2013Ivan Sanders
 
San Fernando Valley SharePoint UserGroup Jully 11, 2012
San Fernando Valley SharePoint UserGroup Jully 11, 2012San Fernando Valley SharePoint UserGroup Jully 11, 2012
San Fernando Valley SharePoint UserGroup Jully 11, 2012Ivan Sanders
 
Creating Business Intelligence With Share Point 2010
Creating Business Intelligence With Share Point 2010Creating Business Intelligence With Share Point 2010
Creating Business Intelligence With Share Point 2010Ivan Sanders
 
SharePoint Saturday Orlando 2012 Creating Business Intelligence with SharePoi...
SharePoint Saturday Orlando 2012 Creating Business Intelligence with SharePoi...SharePoint Saturday Orlando 2012 Creating Business Intelligence with SharePoi...
SharePoint Saturday Orlando 2012 Creating Business Intelligence with SharePoi...Ivan Sanders
 
SharePoint 2010 Application Lifecycle Management
SharePoint 2010 Application Lifecycle ManagementSharePoint 2010 Application Lifecycle Management
SharePoint 2010 Application Lifecycle ManagementIvan Sanders
 
SharePoint Saturday Houston 2012
SharePoint Saturday Houston 2012SharePoint Saturday Houston 2012
SharePoint Saturday Houston 2012Ivan Sanders
 
Creating Business Intelligence with SharePoint 2010
Creating Business Intelligence  with SharePoint 2010Creating Business Intelligence  with SharePoint 2010
Creating Business Intelligence with SharePoint 2010Ivan Sanders
 
SharePoint Intelligence Real World Business Workflow With Share Point Designe...
SharePoint Intelligence Real World Business Workflow With Share Point Designe...SharePoint Intelligence Real World Business Workflow With Share Point Designe...
SharePoint Intelligence Real World Business Workflow With Share Point Designe...Ivan Sanders
 

More from Ivan Sanders (20)

#OCSPUG SharePoint 2013 Best Practices
#OCSPUG SharePoint 2013 Best Practices#OCSPUG SharePoint 2013 Best Practices
#OCSPUG SharePoint 2013 Best Practices
 
O365 DEVCamp Los Angeles June 16, 2015 Module 06 Hook into SharePoint APIs wi...
O365 DEVCamp Los Angeles June 16, 2015 Module 06 Hook into SharePoint APIs wi...O365 DEVCamp Los Angeles June 16, 2015 Module 06 Hook into SharePoint APIs wi...
O365 DEVCamp Los Angeles June 16, 2015 Module 06 Hook into SharePoint APIs wi...
 
O365 DEVCamp Los Angeles June 16, 2015 Module 05 Hook into Apps for Office
  O365 DEVCamp Los Angeles June 16, 2015 Module 05 Hook into Apps for Office  O365 DEVCamp Los Angeles June 16, 2015 Module 05 Hook into Apps for Office
O365 DEVCamp Los Angeles June 16, 2015 Module 05 Hook into Apps for Office
 
O365 DEVCamp Los Angeles June 16, 2015 Module 04 Hook into Office 365 APIs
O365 DEVCamp Los Angeles June 16, 2015 Module 04 Hook into Office 365 APIsO365 DEVCamp Los Angeles June 16, 2015 Module 04 Hook into Office 365 APIs
O365 DEVCamp Los Angeles June 16, 2015 Module 04 Hook into Office 365 APIs
 
O365 DEVCamp Los Angeles June 16, 2015 Module 03 Hook into Apps for Sharepoint
O365 DEVCamp Los Angeles June 16, 2015 Module 03 Hook into Apps for SharepointO365 DEVCamp Los Angeles June 16, 2015 Module 03 Hook into Apps for Sharepoint
O365 DEVCamp Los Angeles June 16, 2015 Module 03 Hook into Apps for Sharepoint
 
O365 DEVCamp Los Angeles June 16, 2015 Module 02 Setting up the Environments
O365 DEVCamp Los Angeles June 16, 2015 Module 02 Setting up the EnvironmentsO365 DEVCamp Los Angeles June 16, 2015 Module 02 Setting up the Environments
O365 DEVCamp Los Angeles June 16, 2015 Module 02 Setting up the Environments
 
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
 
Practical Business Intelligence in SharePoint 2013 - Helsinki Finalnd
Practical Business Intelligence in SharePoint 2013 - Helsinki FinalndPractical Business Intelligence in SharePoint 2013 - Helsinki Finalnd
Practical Business Intelligence in SharePoint 2013 - Helsinki Finalnd
 
Real world business workflow with SharePoint designer 2013
Real world business workflow with SharePoint designer 2013Real world business workflow with SharePoint designer 2013
Real world business workflow with SharePoint designer 2013
 
Practical Business Intelligence with SharePoint 2013
Practical Business Intelligence with SharePoint 2013Practical Business Intelligence with SharePoint 2013
Practical Business Intelligence with SharePoint 2013
 
SharePoint 2013 Business Intelligence Demos to build your businesss 2.0
SharePoint 2013 Business Intelligence Demos to build your businesss 2.0SharePoint 2013 Business Intelligence Demos to build your businesss 2.0
SharePoint 2013 Business Intelligence Demos to build your businesss 2.0
 
Self-Service Business Intelligence in SharePoint 2013
Self-Service Business Intelligence in SharePoint 2013Self-Service Business Intelligence in SharePoint 2013
Self-Service Business Intelligence in SharePoint 2013
 
Practical businerss intelligence in share point 2013
Practical businerss intelligence in share point 2013Practical businerss intelligence in share point 2013
Practical businerss intelligence in share point 2013
 
San Fernando Valley SharePoint UserGroup Jully 11, 2012
San Fernando Valley SharePoint UserGroup Jully 11, 2012San Fernando Valley SharePoint UserGroup Jully 11, 2012
San Fernando Valley SharePoint UserGroup Jully 11, 2012
 
Creating Business Intelligence With Share Point 2010
Creating Business Intelligence With Share Point 2010Creating Business Intelligence With Share Point 2010
Creating Business Intelligence With Share Point 2010
 
SharePoint Saturday Orlando 2012 Creating Business Intelligence with SharePoi...
SharePoint Saturday Orlando 2012 Creating Business Intelligence with SharePoi...SharePoint Saturday Orlando 2012 Creating Business Intelligence with SharePoi...
SharePoint Saturday Orlando 2012 Creating Business Intelligence with SharePoi...
 
SharePoint 2010 Application Lifecycle Management
SharePoint 2010 Application Lifecycle ManagementSharePoint 2010 Application Lifecycle Management
SharePoint 2010 Application Lifecycle Management
 
SharePoint Saturday Houston 2012
SharePoint Saturday Houston 2012SharePoint Saturday Houston 2012
SharePoint Saturday Houston 2012
 
Creating Business Intelligence with SharePoint 2010
Creating Business Intelligence  with SharePoint 2010Creating Business Intelligence  with SharePoint 2010
Creating Business Intelligence with SharePoint 2010
 
SharePoint Intelligence Real World Business Workflow With Share Point Designe...
SharePoint Intelligence Real World Business Workflow With Share Point Designe...SharePoint Intelligence Real World Business Workflow With Share Point Designe...
SharePoint Intelligence Real World Business Workflow With Share Point Designe...
 

Recently uploaded

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
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 StreamsRoshan Dwivedi
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 

Recently uploaded (20)

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 

Ep development best practices v.06

  • 1. Best Practices and Avoiding Common Errors with SharePoint Development Ivan Sanders SharePoint Architect Microsoft SharePoint Server MVPDimension Solutions inc. ivan@dimension-si.com
  • 2. Topics Data access Site objects Cross-site objects Data aggregation SharePoint trivia Questions and Answers
  • 4. SharePoint Lists List data is stored in single UserInfo table for each content database List constructs are virtualized and non-relational (but you can create relationships programmatically) Lists are optimized for UI not for transactional data access Limited data types and data type instances
  • 6. Data Retrieval Use an indexer to return a single list item from the collection
  • 7. Data Retrieval Use an indexer to return a single list item from the collection
  • 8. Data Retrieval Looping operations in the object model are very resource intensive
  • 9. Data Retrieval Design architecture to support application requirements Use CAML queries for targeted item selection Maintain SQL indexes for optimal query execution Manipulate item data using in-memory objects (SPListItemCollection, DataTable, <List>, XML) For extremely large data sets, segment data across multiple content databases
  • 10. Data Presentation 2000 item limit guideline applies only to built-in list views NOT to list contents Extremely large list structures (10,000+ items) require custom web parts to display content Data-bound objects provide best performance XML + XSLT outperforms list view objects Page results to reduce rendering times Beware caching of large data sets in ViewState
  • 11. Web Services Provide front-end for OM code Return list objects as XML Manipulating XML in memory is more efficient than repeated calls OM Require extensive text manipulation Beware column name differences and content formatting
  • 12. Web Services SharePoint Emoticons (My Fav) 0;# SP sticking its tongue out (:-P) X0020 This_x0020_is_x0020_My_x0020_Favorite ows_ All Your Fields Are Belong to OWS -1001 Look! Booleans can be anything!
  • 13. Demo Using SharePoint Lists as a Data Source
  • 15. CAML No native cross-site functionality Combine with recursive methods to create consolidated dataset Recurse list of site and list objects (XML, Delimited, GetSubwebsForCurrentUser, etc.) Store list items in ADO.NET object (DataTable, DataSet, etc.) Be aware of memory issues when using SPQuery to retrieve very large datasets
  • 16. PortalSiteMapProvider MOSS only Optimized for repeated calls to same set of objects Use the GetCachedListItemsByQuery() method for cacheable items that do not change often Executes CAML Query without having to walk the collection of SPWeb objects List items must still be iterated using in-memory methods
  • 17. Search Provides non-contextual item data within defined scope(s) Requires parsing potentially large number of results (XML or ResultTable) Scopes and queries must be managed to return desired results – no guarantee that default results will include the desired item(s) Access to contextual item data requires recursive object methods
  • 18. Web Services Some methods provide multiple object support (lists, Webs, etc.) Results are non-contextual; however, most metadata is available in native methods Resultant XML must be parsed and manipulated XML may be consolidated and XPATH used in place of recursion Extensive/repetitive calls increase overhead on WFEs
  • 19. Demo Retrieving SharePoint List Items from Multiple Site Collections using MOSS Search
  • 21. Relational Data SharePoint lists are inherently non-relational Structure in Lists table Data in UserInfo table Fixed number of field elements Relationships must be created programmatically using combination of list definitions and ADO.NET, LINQ, etc.
  • 22. ADO.NET Define list structures and primary/foreign keys Remember data type limitations Retrieve list objects via OM or Web Services Create relational DataSet objects, merge into single DataTable Use stand-beside DB for caching and native SQL queries
  • 23. LINQ Simplifies programming Allows for normalized query language similar to T-SQL Performance impact is dictated by type of operation Lists expose XML which can be directly queried
  • 24. Recursive Site Queries Avoid direct database queries Create Timer Job or Windows Service to execute recursion code Schedule for off-peak hours Store results in separate database Query against custom DB Batch bulk update tasks using Web services Avoid populating data warehouse via event handlers
  • 25. Best Practices Site Objects – Use CAML to retrieve list objects Create custom web parts to display large datasets Cross-Site Objects – PortalSiteMapProvider and Search provide optimal performance External Objects SP to SP – Use web services Other – Employ least overhead-intensive method Data Aggregation – Relational list methods should be reserved for smaller datasets
  • 27. Round 1: Lists are limited to 1,000,000 individual items
  • 28. Round 2: You may omit the “ows_” prefix from field names in Object Model CAML queries
  • 29. Round 3: Web services are more efficient at retrieving large datasets than CAML
  • 30. Round 4: Executing a Full Text SQL Query against the search API returns a ResultTable object
  • 31. Round 5: Using SPList.GetListAsDataTable() returns XML Encoded results
  • 32. Q & A
  • 34. Resources SharePoint 2007 Performance and Scalability White Paper http://blogs.msdn.com/sharepoint/archive/2008/06/17/belated-announcement-sharepoint-server-2007-scalability-and-performance-whitepaper-now-available.aspx Patterns and Practices Guidance http://www.codeplex.com/spg