My new blog

My blog has moved to www.davehunter.co.uk/blog see you there.

Monday, 9 July 2007

Use Cases vs Requirements

I'm about a quarter of the way through MCPD 70-547 Designing and Developing Web-Based Applications using Microsoft .NET Framework, I have already picked up some good tips. One that comes to mind is about Use Cases and Requirements.

Mike Snell talks about why you need both use cases and requirements. His mentions a real world example, in which he takes two projects. One project captures the requirements in the form of use cases only and the other with solely requirements. Mike wrote the other half (in the use case project he wrote the requirements and in the requirements project he wrote the use cases), he found that:

  • Requirements that were written using the use cases were open to interpretation. This often meant key requirements were missed.
  • A project containing use cases can be quickly translated into test cases.

Requirements serve one purpose and use cases serve another. To fully capture the requirements you need both.

I would recommend reading this book, even if you don't want to take the exam.

Sunday, 8 July 2007

SharePoint 2007 Virtual Labs

Here's a list of SharePoint 2007 Virtual Labs

TechEd IT Forum 2007 - Powered by SharePoint 2007

Microsoft's website for TechEd IT Forum 2007 (12-16 November 2007 Barcelona, Spain) is built upon SharePoint 2007. It's also a nice example of a usable flash / html mix site which doesn't look like a typical SharePoint 2007 site.

http://www.mseventseurope.com/teched/07/itforum/pages/default.aspx


Removing hidden and damaged webparts from a page

You can remove hidden or damaged webparts from a page by appending "?contents=1" to the url (if the url already contains a querystring parameter replace "?" with "&"). This will bring up a screen listing all the webparts on the page (both visible and hidden). You can then select any web part and remove it.

If a webpart is causing significant damaged to a page (ie throwing an exception which isn't handled in the webpart) then you should see a SharePoint error page with a link to the remove webparts from the current page.

Thursday, 5 July 2007

Devil wears Prada featuring Microsoft Exchange Unified Messaging

Not sure how geniune this is, but worth taking 5 minutes out to watch :)


Are your labels getting out of hand?

If you use http://www.blogger.com/ and the label widget you may find that you have too many links displayed under the labels section ... I did.

There aren't any properties to restrict how many links appear. After looking through the html of the template, you can add an if clause to only show labels if they appear more than once. You will need to find the label widget with the HTML of the template and add the lines hightlighted.

<b:widget id="'Label1'" locked="'false'" title="'Labels'" type="'Label'">
<b:includable id="'main'">
<b:if cond="'data:title'"> <h2><data:title/></h2></b:if>
<div class="'widget-content'">
<ul>
<b:loop values="'data:labels'" var="'label'">
<b:if cond="'data:label.count > 1">
<li>
<b:if cond="'data:blog.url">
<data:label.name/>
<b:else/>
<a href="'data:label.url'"><data:label.name/></a>
</b:if> (<data:label.count/>) </li>
</b:if>
</b:loop>
</ul>
<b:include name="'quickedit'/"> </div>
</b:includable>
</b:widget>


You will need to replace ">" within the if statement with the HTML character code. Also increase 1 if you want to show labels with more than 3, 4, 5, 6 ... for example.

Complete list of STSADM operations (with parameters) in SharePoint 2007

Jose Barreto wrote a great reference article on the STSADM operations and the parameters.

http://blogs.technet.com/josebda/archive/2007/03/22/complete-reference-of-all-stsadm-commands-with-options-in-moss-2007.aspx

STSADM Import / Export

STSADM has two operations called "import" and "export".

Export allows you to backup a copy of a site to the file system. This will generate one or more .CMP files (based on the size of the site, this will distribute the contents over many .CMP files).

Import allows you to take the files generated by an export and import over a blank SharePoint Site.

Please note: Both Import and Export operations for STSADM deal with an entire site. You can not export or import individual items such as lists or items.

I used Import / Export during a migration to restructure the sites. Basically I had a collection of WSS sites for active projects and a collection of WSS sites for archive projects which weren't logically organised. I wanted to introduce a level for the active projects and another level for the archive projects. I created these levels (active and archive) in SharePoint through the standard create site function. I then need to move the archived sites under archive and active under the active site. This process is often referred to a re-parenting. I did this using STSADM and the Export operation and the Import operation (see below).

STSADM -o export -url http://localhost/ProjectSite1 -filename c:\export\ProjectSite1 -includeusersecurity
STSADM -o createweb -url http://localhost/Archive/ProjectSite1
STSADM -o import -url http://localhost/Archive/ProjectSite1 -filename c:\export\ProjectSite1.cmp -includeusersecurity

Please note: By using the parameter "includeusersecurity" it preserves the current user, rights for the site. This is an optional parameter, but very useful.

The createweb operation creates a blank site for the import to write the contents of the export over. You shouldn't specify a sitetemplate as you just need a blank container (the template is defined in the export .CMP files).

STSADM is a command line tool, so you could wrap these commands in a batch file.

Please see my post about errors when using the Import / Export commands here.

Wednesday, 4 July 2007

Microsoft Demo: Configure a SharePoint Server 2007 Site to Receive E-Mail

Overview - By configuring your Office SharePoint Server 2007 site to receive e-mail messages, you can enable team members to use e-mail to send information, messages, and files directly to different areas of the site.

http://www.microsoft.com/downloads/details.aspx?FamilyID=c910a323-164d-4fad-8646-64872ffe4c46&DisplayLang=en

Monday, 2 July 2007

MOSS & WSS Management Packs

MOSS and WSS V3 Management packs for Operations Manager 2007 (MOM)

For more information on MOM http://www.microsoft.com/mom/default.mspx

Guidelines to Design and Develop Acessible Websites

Microsoft whitepaper - Guidelines to Design and Developer Accessible websites using MOSS 2007, MCMS and SharePoint 2003

http://www.microsoft.com/downloads/info.aspx?na=22&p=12&SrcDisplayLang=en&SrcCategoryId=&SrcFamilyId=&u=%2fdownloads%2fdetails.aspx%3fFamilyID%3d35487ef8-8e92-4f3b-96bf-2dfd7f4602d2%26DisplayLang%3den

Hands on labs for Windows Workflow Foundation (WF)

http://www.microsoft.com/downloads/details.aspx?familyid=2e575633-e357-4ee7-aaff-34138f00e830&displaylang=en

Windows Workflow Foundation gives you the building blocks (model, engine and tools) to enable you to create workflow enabled applications on the Windows platform. The download contains 10 hands-on labs in C# and VB.NET. MSDN has more information about Windows Workflow Foundation.

Labs include:

  • Getting started with Windows Workflow Foundation
  • Creating Custom Activities
  • Hosting Workflows
  • Creating State Machine Workflows
  • Communicating with the Host Application
  • Workflow and Web Services
  • Creating Rules Driven Workflows
  • Transactional Behavior in Workflow
  • Modifying Workflow Models at Runtime with Workflow Change
  • Embedding the Workflow Designer

Friday, 29 June 2007

SharePoint 2007 - MySite Self Service Site Creation

After setting up a new SharePoint 2007 installation an end user got the following error message when trying to create a new MySite "Your personal site cannot be created because Self-Service Site Creation is not enabled. Contact your site administrator for more information".

You can enabled Self Service Site Creation by

  • Open Central Administration
  • Click on the Application Management tab
  • Click on the Self-Service Site Management link
  • Click on the checkbox for "Enable Self-Service Site Creation" against the site collection hosting the MySites.

Integrating Office SharePoint Server 2007 and SAP

I've been recently looking into MOSS integration with SAP. Found this whitepaper useful.

from saptech:

The SharePoint Team published a new whitepaper which describes the innovations in Microsoft Office SharePoint Server 2007 that make interoperability with SAP easier than ever. The paper explains the general business and technical challenges facing customers who want to bring the power of their SAP assets into the tools and places where information workers do most of their work. It then shows how Office SharePoint Server 2007 addresses those challenges and, finally, describes various interoperability options, from simply displaying SAP information in a portal page to creating complex business process solutions that incorporate SAP data. You can download the paper at Integrating Office SharePoint Server 2007 and SAP. If you have any questions or feedback feel free to send me a mail!

Microsoft-SAP technical guidance portal http://www.microsoft.com/isv/sap/technology/interop/sharepoint.aspx

Telerik RadEditor available for MOSS



The Telerik RadEditor is now available for SharePoint 2007 (MOSS) in Lite and Full versions. If you've worked with MCMS you would of heard of Telerik. The Telerik RadEditor was a huge improvement over the native HTML placeholder control even in the Lite (Free) version.

After looking at the comparison chart http://www.telerik.com/documents/RadEditorMOSS_Feature_Comparison.pdf both the RadEditor Lite and MOSS out-of-the-box editor have the same features. The Full version of the RadEditor has the following aditional benefits.

Formatting text appearance

  • Strikethrough
  • Superscript
  • Subscript

Formatting paragraphs and lists

  • New paragraph
  • Horizontal ruler
  • Justify

Working with portions of text

  • Inline AJAX spellchecker
  • Print
  • Paste from word
  • Paste from word cleaning font and sizes
  • Paste plain text
  • Paste as HTML

Inserting elements

  • Absolute positioning
  • Flash manager
  • Windows Media manager
  • Document manager
  • Insert special character
  • Insert code snippet
  • Insert custom link
  • Insert time
  • Insert date

View

  • Preview mode
  • Full screen
  • Modules
  • Docking / undocking
  • Zoom (in and out)

Misc

  • Repeat
  • Find and replace

Modules

  • Properties inspector
  • Real time HTML inspector
  • Statistics module
  • Find and replace

For more info http://www.telerik.com/products/sharepoint/overview.aspx

Thursday, 21 June 2007

Creating Content Types with the Content Types Viewer

This post shows how to create content types using the Content Types Viewer and features. In this post we are going to create a "car" content type with a "door", "engine" and "colour" site columns. This post assumes you are familiar with SharePoint 2007 administration.

The Content Types Viewer is available to download from http://www.codeplex.com/MOSS2K7CTypesViewer/

1. Once on your SharePoint 2007 site go to site settings and the site column gallery.

2. Create a new "doors" site column as a number attribute.


Tip: Always create new site columns or content types in a custom folder. This makes them easy to find and separates them from the out of the box ones.




3. Create a new "engine" site column as a string attribute.




4. Create a new "colour" site column as a choice attribute (add any colours for the choices).





5. Create a new "Car" content type inheriting from a list item.




6. Add the newly created site columns to the "Car" content type.






7. Run the Content Types View. Type in the URL of the site collection and click "GO".





8. Select the "Car" content type.





9. Click on the "Show Fields" button.




10. Create a new folder called "DemoSiteColumns" under C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Template\Features\.

11. Create a new file called features.xml containing:
<Feature Id="F5E3FEE8-1D9B-4b95-848B-7614D638B90D" Title="Demo Site Columns" xmlns="http://schemas.microsoft.com/sharepoint/" Description="Enables the Demo Site Columns" version="1.0.0.0" scope="Site" hidden="FALSE">
<ElementManifests>
<ElementManifest Location="elements.xml">
</ElementManifests>
</Feature>

12. Create a new file called elements.xml.

13. Open elements.xml in notepad. Click on the "Copy to Clipboard" button from the Content Types Viewer.

14. Select edit > paste from the notepad window and save changes to the elements.xml file.

15. Click on the "Show Field Refs" button.


16. Create a new folder called "DemoContentType" under C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Template\Features\

17. Create a new file called features.xml containing:
<Feature Id="3B4752E6-8D62-4df0-A4D3-31C8E99D44FC" Title="Demo Content Type" xmlns="http://schemas.microsoft.com/sharepoint/" Description="Enables the Demo Content Type" version="1.0.0.0" scope="Site" hidden="FALSE">
<ElementManifests>
<ElementManifest Location="elements.xml">
</ElementManifests>
</Feature>

18. Create a new file called elements.xml.

19. Open elements.xml in notepad. Click on the "Copy to Clipboard" button from the Content Types Viewer.

20. Select edit > paste from the notepad window and save changes to the elements.xml file.

21. Open a command prompt and type the following:

CD C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\bin
stsadm -o installfeature -file DemoSiteColumnsstsadm -o installfeature -file DemoContentType

22. Before activating the features either delete the existing site columns and content types or activate the features in a different site collection.

23. Go back to the command prompt and type the following:

stsadm -o activatefeature -file DemoSiteColumns -url http://localhost/
stsadm -o activatefeature -file DemoContentType -url http://localhost/

You have now created two features which create the site columns and the "Car" content type.

Prescan now available to download

You can download PreScan.exe here http://www.microsoft.com/downloads/details.aspx?FamilyID=e8a00b1f-6f45-42cd-8e56-e62c20feb2f1&DisplayLang=en.

You will need to run PreScan.exe against your WSS V2 or SharePoint Portal 2003 sites before they are migrated. PreScan scans the V2 SharePoint site for customised site templates, sites based on custom site definitions, unghosted pages, custom webparts, orphaned objects and sites that are based on languages or have customisations that are not installed. PreScan reports issues found. These will need to be resolved for the migration to be successful.

Some great posts about PreScan

Wednesday, 20 June 2007

Articles for Microsoft 2007 Products

Great source of useful articles
http://www.asaris.de/sites/walsh/Lists/Articles%20for%202007%20Products/Grouped%20By%20Category.aspx

Team Collaboration Feature SharePoint 2007

Someone in the Microsoft SharePoint 2007 product team has a sense of humour or a good example of creative coding or maybe a good way to distinguish between features ... I'll let you decide. The GUID of the collaboration feature is

<Feature ID="00BFEA71-4EA5-48D4-A4AD-7EA5C011ABE5">

Is it me or does this look like collaboration?

Tuesday, 19 June 2007

Using the Content Types Viewer

The content types viewer is a windows form which displays information about content types that exist in SharePoint 2007. I came to write the tool because creating custom content types using features was quite time consuming. Creating content types with a web browser is more intuitive but there is no easy way to deploy them. The content types viewer looks like:




Download it here http://www.codeplex.com/MOSS2K7CTypesViewer/

How to use the content types viewer

  1. Type in the url of the site collection where the content types are. Then click on "GO".
  2. Select a content type from the list of content types displayed.
  3. You have 3 choices. You can view the schema of the content type by clicking "Show Schema". You can also view the fields (the xml displayed is used for features that create site columns) by clicking "Show Fields" and field refs (the xml displayed is used for features that create content types) by clicking "Show Field Refs".

Show Schema example:


Show Fields example:



Show Field Refs example:



Comming soon ... creating content types with the Content Types Viewer.

Updated: Creating content types with the Content Types Viewer