Professional Documents
Culture Documents
Home > SSW Standards > SSW Rules > Rules to Better SharePoint
Do you agree with them all? Are we missing some? Let us know what you think.
SharePoint designer can silently reformat your code and introduce errors.
If you modify any masterpage or pagelayout file with SharePoint designer, it becomes ghosted. This means that
SharePoint is now looking at a customized version stored in the database rather than the version on the file system.
You then can't deploy changes using SharePoint solutions & features.
2. Developers should work on all custom webparts in their own SharePoint development
environment.
This is to prevent their work affecting other developers. Sort of things you can expect to happen:
IIS resets need to be done frequently, which stops the SharePoint website working.
Custom webparts can easily introduce memory leaks which can stop SharePoint working.
When working on packaging SharePoint artefacts into Features & Solutions, you should always make small
incremental changes to your VSeWSS projects. Each time you should build & deploy to check you haven't broken
anything.
You should regularly make labels in TFS so you can quickly compare your changes against previous working versions
to identify problems.
Try to customize existing out-of-the-box SharePoint webparts before you roll your own.
*Note: Moved to http://sharepoint.ssw.com.au/Standards/SoftwareDevelopment/RulesToBetterSharePoint/Pages
/CustomizeYourSharePointWebparts.aspx
1 of 5 8/12/2011 9:58 AM
Rules to Better SharePoint http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterSharePoint...
All SharePoint customization and development must be done on a Virtual Machine. No ifs, no buts.
1. It's very important to correctly setup a SharePoint environment for development. Correctly configured, this will save
you a lot of trouble later on.
2. From time to time, you can seriously screw/damage a SharePoint installation during development and it is best not to
install SharePoint on your day-to-day machine.
3. Additionally, when you start a new SharePoint project you don't want to carry all the baggage from previous
customizations that could potentially affect your new project.
There are many other benefits of using a virtual machine for development
1. Virtual machines can be fired up and shut down easily
2. Virtual machines can run faster, via being located on a different server and thus it doesn't waste developers' own
computer resources
3. Virtual machines can be copied and brought to a client for demonstration or testing
4. They are the best way to quickly test or experiment with something new
5. Bad: There might be more work required to activate additional servers
6. Bad: You need at least 2 GB of RAM
If you are after a clean, pre-configured SharePoint server image to test SharePoint, the easiest way is to download a
trial VM from Microsoft
More info on setting up SharePoint VM
*Note: Moved to http://sharepoint.ssw.com.au/Standards/SoftwareDevelopment/RulesToBetterSharePoint/Pages
/CustomWebparts.aspx
6. SharePoint version?
When your SharePoint website was built successful, you need to create SharePoint version to let users know what
version is it
2 of 5 8/12/2011 9:58 AM
Rules to Better SharePoint http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterSharePoint...
A site column is created on a site level and visible to all lists and content types within that site (and subsite).
3 of 5 8/12/2011 9:58 AM
Rules to Better SharePoint http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterSharePoint...
A Favicon is a small image file included on nearly all professional developed SharePoint sites. The Favicon reflects the
look and feel of the SharePoint site or the organizations logo.
Figure: Good Example - Using the favicon gives your SharePoint site a very professional look and feel.
Internet Explorer ("IE") 5.0 and above has a function that, if someone bookmarks the page, It will look for favicon.ico
from the directory of the web page, if not found it will look for it from the root directory of the SharePoint site. Otherwise
it will use the default Icon.
To implement the favicon:
1. Copy your company's .ico icon to the root of the site and rename it to favicon.ico
2. Add the yellow code between the <HEAD> tags in your MasterPage.master (or regular HTML/ASPX page)
Note: If you put the icon with the default file name of favicon.ico in the root directory of your domain, you don't need to
add the following code. Because each time your Web page is added to a user's favorites, Internet Explorer automatically
searches for this file from the root directory and places the icon next to all the favorites and quick links originating from
your site.
<head runat="server">
<title>Coogee Australia - Self catering self contained holiday accommodation, water views, close to beach</title>
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<link href="http://www.ssw.com.au/ssw/Include/ssw.css" type="text/css" rel="stylesheet">
<link rel="shortcut icon" href="~/Style Library/SSW/favicon.ico" type="image/x-icon" />
</head>
Figure: One line of HTML lets you add your company's icon to your web page
For more information about the shortcut icon, check out msdn.microsoft.com
We have a program called SSW Code Auditor to check for this rule.
4 of 5 8/12/2011 9:58 AM
Rules to Better SharePoint http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterSharePoint...
Acknowledgements
John Liu
What does it cost? I’m not in Australia. Can you still help?
5 of 5 8/12/2011 9:58 AM