All posts tagged Best Practices

Sysprepped SharePoint 2010 Development Image

SharePoint 2010 is here and it’s time to do things right this time around. To me, doing it right means that everything I do should be reusable. Those reusable components may be for our internal developers or it may be something that the sales team can run with but either way that’s the goal.

The requirements

When it came time to put together the image that would be reused for all the developers across the company we needed a solution a little bit more robust then the solution we used for SharePoint 2007. Below are some of our requirements:

  1. Consistent installations between environments
  2. Follow best practices where possible (development environments historically break this rule for ease of use)
  3. Unique computer name for each person to avoid network collisions
  4. Automated installation to allow for quick spin up of development environments
  5. Should use VMware (We recently transitioned everything from Virtual PC to VMware due to 64bit requirements)

In addition to these requirements we also put in place some new machine requirements for all developers. At a high level this includes 8 GB of ram and quad core processors. The developer has input for the remaining specs. Continue reading →

Setting up BGInfo on your SharePoint Servers

What is BGInfo?

BGInfo embeds key pieces of configurable server information into the desktop background when a user logs into the machine.

This information really applies to all servers but I figured I would focus on SharePoint. On all of my servers I run the same BGInfo script that runs at logon. The script really helps in the management of the servers because it gives me an at a glance look at some key pieces of information.

This information includes metrics such as :

  • Boot Time
  • Snapshot Time
  • CPU
  • Memory
  • Disk Space
  • OS Version / Patch Level
  • IE Version
  • Domain / IP / Network Information

I’ve found that all of these pieces of information are extremely helpful in the management of the SharePoint environment. They help me answer questions when troubleshooting an issue as soon as I log in such as: Am I out of disk space due to my log files growing? Am I on the latest OS service pack level? Does this virtual have enough memory assigned to it? Has the machine lost it’s connection to the domain controller?

Download my BGInfo configuration file
Download BGInfo

Also when automating the run of BGInfo be sure to use the proper command line parameters so that it doesn’t annoy the user with unnecessary dialogs.

bginfo.exe \\path\to\bginfo.bgi /nolicprompt /silent /timer:0

Admin and End User Naming Conventions

SharePoint naming conventions, or any naming conventions for that matter, are great… but they are only good if they are followed and used consistently. This article is not designed to be a definitive list of what to do but more of a guide that will hopefully help you establish your own best practices within your organization. Continue reading →

Understanding SharePoint Features

First… What Is a Feature?

A feature is a mechanism to deploy and activate customizations to a SharePoint environment. Features can be activated in the user interface empowering the administrator or end user with the ability to easily enable or disable a customization. Features are made of a manifest or feature.xml, one or many additional element XML files and additional resource files if applicable. Read more at MSDN. The most important benefit to features is that they can be deployed with Solution Packages (WSP), using solution packages will keep you in a supported, restorable state and encourages developers to focus on deployment and packaging during the initial phases of development which is extremely important. Continue reading →

Properly Checking Metadata in SharePoint Workflow

Since you want your SharePoint workflow to be as fault tolerant as possible it is always a good idea to use the following method when you are accessing fields from an SPListItem. This is especially true if they are custom fields that are deployed via a Site Column or Content Type as your workflow will receive nasty errors such as “Null Reference Exception” and “Array Out of Bounds Exception” otherwise.

if (workflowProperties.Item.Fields.ContainsField("Custom Field") && workflowProperties.Item["Custom Field"] != null && workflowProperties.Item["Custom Field"].Equals("Some Value"))
{
// continue with rest of code
}