Common Coding Issues When Using the SharePoint Object Model

A link which I reference often over at MSDN is the Best Practices: Common Coding Issues When Using the SharePoint Object Model. I wanted to share it with any readers that may be unaware of its existence, and, an easy place for me to find it if I ever lose the bookmark. I generally browse it before jumping into a new project, just to make sure I am following the best practices when writing custom code against the API. At the time of writing a web part, event receiver, or workflow, it may be for a small set of data, but, you need to plan for growth.

Example: If you hear “this list will never have more than one or two hundred items in it”, you better plan for having several thousand, or tens of thousands. Needs change, it is a fact of life and business. By following some simple coding practices as outlined above, you can be ahead of the game, and not have to iterate through thousands upon thousands of list items you are querying for only a small subset, then you will not have to worry about angry users wondering why a page takes 45 seconds to load with only a single web part on it – yours.



About Geoff Varosky
Geoff Varosky is a Senior Architect for Insight, based out of Watertown, MA. He has been architecting and developing web based applications his entire career, and has been working with SharePoint for the past 15 years. Geoff is an active member of the SharePoint community, Co-Founder and Co-Organizer of the Boston Area SharePoint Users Group, co-founder for the Boston Office 365 Users Group, co-organizer for SharePoint Saturday Boston and speaks regularly at SharePoint events and user groups.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: