A "best practice" is a method or process that practitioners recognize (usually through experience and research) as being more effective at getting the job done than other methods (or processes).

learn more… | top users | synonyms

23
votes
6answers
4k views

List of best practices on structuring SharePoint 2010 solutions

I am looking for good guidance on how to structure a SharePoint Solution including: Visual Studio Project Structure Features (how to separate features) Namespaces When to use multiple project ...
23
votes
1answer
12k views

Using SPContext.Current or using static URL

There are multiple ways to work in the SP object model. The starting point for instantiating objects looks different when you look at different developers. Many times I see people doing this: SPList ...
19
votes
2answers
706 views

What are some disaster recovery best practices?

What is the best way to back up SharePoint without the backup files using up all your enterprise storage? I am currently backing up SQL weekly(content dbs, config db), and doing site collection ...
17
votes
5answers
1k views

Organizing WebParts in Visual Studio - Best Practices

My team is responsible for maintaining a SharePoint 2010 site that was developed by another group. This maintenance includes updates to existing web parts (approximately 20). Currently, all of these ...
10
votes
3answers
3k views

Best way to Impersonate in SharePoint

So far, I am aware of below 3 ways of performing impersonation in a SharePoint web part or page : Using Win32 API [DllImport("advapi32.dll", SetLastError=true)] public static extern bool ...
10
votes
3answers
5k views

Cross Site Collection Navigation

We are using SharePoint for our Intranet. We will have a site collection for the Intranet. Then a site collection for each department in the business. I.E. HR, IT, Finance. We are creating a custom ...
10
votes
1answer
1k views

Is Calling base.ItemUpdating(properties); necessary?

In an event receiver, is it necessary to call base.ItemAdding(properties);, base.ItemUpdating(properties);, etc. at the beginning of your event handler? I've seen people arguing that it isn't ...
10
votes
2answers
787 views

“Best Practices” for SharePoint customizations/development to easily migrate to new SharePoint versions

Do you know of any documents that describe “best practices” for SharePoint customizations (especially custom developments) in order for these customizations/code (for example web parts, event ...
9
votes
2answers
657 views

SharePoint 2013 CSOM: Is it better to pass a Context object around or a Url?

In SharePoint 2013 CSOM is it better to pass a Context object around, or a Url to open a context? Which would be the best example: (Please consider there may be a lot of methods preforming tasks) ...
8
votes
1answer
1k views

Best practices for creating a shared code library for SharePoint projects

I have several projects for SharePoint 2010 (mostly they are separate solutions built each to separate wsp's) in active development. And I have a similar tasks in these projects (logging, ...
8
votes
2answers
713 views

Executing a new instance of a timer job before the previously running instance has finished executing

I have a timer job that invokes a WCF service that invokes a single threaded API internally. TO ensure that my system does not fail, i want to ensure that only a single instance runs at a time. I am ...
7
votes
10answers
4k views

When to use Custom Site Definitions… and not

Its an old battle between ITpro and developer. ITpros hate them due to upgrade issues, devs like the freedom it gives them without having to do house cleaning with feature stapling. What is your ...
7
votes
3answers
1k views

Customization best practices for SP2010 [closed]

We'd like to customize the look of our SharePoint 2010 pages and sites but didn't know what some best practices are: We'd like to change the look of pages some without breaking the link between them ...
7
votes
5answers
3k views

Best practices for building a SharePoint Extranet

What are the best practices when it comes to building a SharePoint Extranet? Any good resources out there? One question that I am particularly looking for some thoughts on is how to best create a ...
7
votes
3answers
3k views

WebPart where to store a connection string

I have a webpart that connects to an external DB. I need somewhere to store the connection string. It is possible for this data source to change but would always be the same for the site collection ...
7
votes
4answers
2k views

URL Redirects (301/302) for Vanity/Friendly URLs

With Microsoft providing zero support when doing URL rewriting, what is my best approach for providing URL redirects? I'm not too familiar with the topic. The approach I've seen (a solution from a ...
6
votes
4answers
3k views

Working with large external lists using BCS

I have a database that I want to display the content in SharePoint 2010. I am not displaying the content in a list but am using a custom WebPart. The database is not updated any more as it is ...
6
votes
2answers
356 views

Is it bad to dispose an object twice?

With all the focus on disposing all disposable objects in SharePoint, I wondered if there is any harm in disposing an object twice. Especially since SharePoint seems to do some disposing itself too. ...
6
votes
2answers
190 views

Best Practice changing usernames for Sharepoint 2010

We are using SharePoint 2010 Enterprise and have a User Profile service set to synchronize against AD DS. When a user's username changes, because of marriage or mis spelling, there are a set of ...
5
votes
5answers
1k views

What is the best practice for redirecting users when sites are being upgraded?

We have an upgrade to an application coming up which requires a site collection to be deleted and recreated. In terms of managing the existing users experience during upgrade what would be the best ...
5
votes
3answers
3k views

Structure of SharePoint Solution

Are their any best practices with respect to how to structure a SharePoint solution? For example we are going to develop several workflows, these will use content types and list definitions. Should ...
5
votes
3answers
197 views

Things to “get right” to succesfully develop Sharepoint solutions

Lets face it, SharePoint 2010 is a big ecosystem. You need to know the GUI, the administration options, the data model, have programming skills, know the API, know how it works internally etc etc. I, ...
5
votes
1answer
8k views

Completely remove a WSP from SharePoint

What is the best way to completely remove a WSP from SharePoint? SO when you reinstall it again from scatch it thinks it is a clean install?
5
votes
2answers
547 views

Instantiating SPListItems in Event Receivers - Best Practices

In the MSDN article Best Practices with Event Receivers it is clearly stated: Do not instantiate an SPWeb, SPSite, SPList, or SPListItem object within an event receiver. The article goes on to ...
4
votes
5answers
2k views

Saving application settings in a SharePoint application best practices

What are the best practices for saving application settings in a Sharepoint application? Would anyone save the settings in the web.config's appsettings? What about saving them in a SharePoint list? ...
4
votes
4answers
662 views

Best practices when creating Site to use as a template

I'm creating a site that I'll eventually use as a template to create other sites from it. The site will contain lists, workflows, user groups, content types etc etc. I want to make lots of clones ...
4
votes
3answers
11k views

When to choose web application vs SiteCollection vs Subsite?

In SharePoint you have the following types of objects: Web application (1) A container in a configuration database that stores administrative settings and entry-point URLs for site collections. ...
4
votes
3answers
775 views

Unit testing web parts

I've read the articles from Andrew Woodward (21Apps) trying to get started with unit testing on WSS, but when I try something more advanced, like Webpart connections, I don't know how to start ...
3
votes
1answer
2k views

Search Crawling Frequency

For Search, How often should you perform an incremental crawl? I was thinking of doing it every two hours? Is that too often? Are there any best practices in terms of frequency of searching?
3
votes
3answers
1k views

Maintenance Page/Downtime

I have an IF site that will be undergoing a fairly large deployment. There will be a few hours of downtime, and I want to put a maintenance page at the front of the site, and prevent any traffic from ...
3
votes
2answers
1k views

Use SPQuery.RowLimit also on large lists with small query results?

I frequently read one should use RowLimit on SPQuerys on a large list, especially with more than 2000 items. Best Practices: Common Coding Issues When Using the SharePoint Object Model: An ...
3
votes
1answer
227 views

Best Practice to handle items modification in SharePoint 2007

From my understanding, there is no checkout function inside a SharePoint 2007 List. So, what is the best practice that SharePoint Professionals and Expert do to make sure that a item of a SharePoint ...
3
votes
1answer
201 views

Should this be a sandboxed solution?

My company outsourced the creation of a SharePoint WebPart for connecting to our cloud service. The WebPart connects to our service by using our REST API. When configuring the WebPart you supply ...
3
votes
3answers
2k views

Dynamically registering JavaScript from within a sandbox web part

I am mid-way through development of a corporate intranet that will be hosted in SharePoint Online. For this reason, we are restricted to using sandbox solutions. One of the last "gotchas" that I need ...
2
votes
2answers
980 views

Reason people don't use SPContext when executing web.Lists[“ListName”].GetItems(query)

I'm building a Site Definition that will be the core of a SharePoint product. I want to use best practices building the data access architecture. Since I do not know what the URL of the site will ...
2
votes
4answers
532 views

Cache SP Objects or custom class?

Just wanted to see what the consensus on this one is… If you make a call to the OM to return a SP object e.g. SPListItemCollection, and then want to cache the results (to improve subsequent ...
2
votes
1answer
388 views

Can we access list from other site collection sites using javascript object model?

ECMAScript object model can only be used in SharePoint sites. So you can’t use this object model in an asp.net site to access SharePoint resources deployed in another url as this is cross-site ...
2
votes
5answers
608 views

When is it right to customize a site definition?

In some scenarios there is a need for being in as much control of the site provisioning process as possible. In some senarios there is a good solution to customize site definition by customizing the ...
2
votes
2answers
310 views

Best practice to add list item in SharePoint Server OM?

from the below codes, which one is best practice and performance wise also:- CASE 1: using (SPSite oSPsite = new SPSite("http://website url/")) { using (SPWeb oSPWeb = oSPsite.OpenWeb()) { ...
2
votes
5answers
5k views

Guidance on renaming the multitude of databases generated by SharePoint 2010

SharePoint 2010 appears to continue SharePoint 2007's tradition of automatically creating horribly named SQL Databases. Like many companies we have multiple farms and developer workstations connecting ...
2
votes
3answers
269 views

Best way to build out and configure multiple lists

So, once you have your SharePoint site all planned out, what is the generally accepted or best way to start building out and configure multiple lists, document libraries and content types? Using the ...
2
votes
3answers
100 views

Best Practice: Javascript Registration SP2007

There is always the ASP.net way of registering javascript on the page using the Page.ClientScript.RegisterClientScript() method, but I was wondering if there was a better way to register your ...
2
votes
1answer
47 views

What is good practice to log information in SharePoint?

We are creating a timer job that imports AD users into SharePoint list. I would liek to log this information somewhere so that at a later time I can check which users were pulled in and/why the ...
2
votes
2answers
102 views

Migrating site collections from developemnt to live

I have several site collections that have been created in development. I now need to move them to live. In the live environment these site collections do not exists. What is the best way to migrate ...
2
votes
2answers
1k views

What is the typical IT support team structure and their general areas of knowledge?

The place I work has purchased SharePoint 2010 Enterprise, for many reasons, but firstly for document management. However they are keen to get to most out of the 'rest of it'. But us developers ...
2
votes
3answers
132 views

4 using statements looks messy? Any suggestions on what is a better way to code this?

Imagine the following code: using (SPSite spSite = new SPSite(this.SiteURL)) { using (SPWeb spWeb = spSite.OpenWeb()) { using (SPSite spSite2 = new SPSite(this.SiteURL2)) { ...
2
votes
2answers
649 views

(De)Commission SharePoint Database Servers

In our SharePoint Farm, We are running with 2 Database Servers and on which we have 20+ Databases.Now, due to some issues we would like to decommission the existing database servers and commission 2 ...
2
votes
1answer
734 views

Web Application or Site Collection Architecture for My Sites in SharePoint 2013

I am designing a solution for our client which have the following 'Areas' Teams Committees My Sites Projects (MS project server) Apps I see the best approach is creating a Web Application (WA) ...
2
votes
2answers
1k views

Best way of getting SPWeb in Event Receiver [Best Practices]

what would be the best way of getting SPWeb and List in context below, specially when list title can be different for different cultural websites, private bool ...
2
votes
1answer
903 views

Disposing of objects in an Event Receiver

I have an ItemUpdated event receiver running on a library. Some pretty basic logic. Here's the gist of what I'm doing: SPWeb web = properties.Web; SPContentTypeId ParentCT_Id = ...