Monday, 1 December 2008

Announcing SharePoint Site Configurator

One controversial topic of late is - should you develop with custom site definitions? A lot of people argue no - they are too complex and will cause upgrade problems into the future.

The majority of SharePoint developers should be familiar with the SharePoint Solutions and Features framework for developing and deploying customisations to SharePoint. A smaller number of developers work with and are familiar with custom site definitions - they are complex and difficult to master. This can cause problems with resourcing as some SharePoint developers will not be productive having to sort out and work with another developers site definition.

To complicate things further - when developing with custom site definitions one can go for the miniminalist approach where most work is implemented in Features, and these Features are simply referenced in the site definition for activation purposes, or you can go ahead and build the work straight into the site definitions. Another problem is developers use the OOTB WSS and MOSS site definitions as examples, and many of those implement functionality in the site definitions themselves instead of in Features.

So it's great to see MCS release the SharePoint Site Configurator on codeplex which will hopefully help to do away with complex custom site definitions.

Tuesday, 25 November 2008

Isolator for SharePoint !

If you are a big fan of TDD and you develop on SharePoint then you need to check out Typemock Isolator for SharePoint - develop and test SharePoint code without a SharePoint server - how cool is that!!!

Head over to Andrew Woodward's blog - for some more TDD goodness - specifically these two posts that link to whitepapers and code for download.

Typemock are offering their new product for unit testing SharePoint called Isolator For SharePoint, for a special introduction price. it is the only tool that allows you to unit test SharePoint without a SharePoint server. To learn more click here.
The first 50 bloggers who blog this text in their blog and tell us about it, will get a Full Isolator license, Free. for rules and info click here.

Thursday, 13 November 2008

Anouncing SPDisposeCheck for SharePoint Developers

So what is SPDisposeCheck

"SPDisposeCheck, will open your custom compiled assemblies recursively and validate them against the Microsoft published guidance. The output from the tool will contain messages that may indicate the SPSite and SPWeb Dispose() methods guidance is are not being followed in the customers source code. While these messages need expert evaluation in order to determine if the software is not performing properly, in some cases just running the tool on your custom code can lead you to simple fixes that improve the quality and performance of custom code on SharePoint. "

"This tool is planned for release during the coming North American Winter. Customers who are currently experiencing difficulties with memory management in their custom applications should review the guidance listed above. Customers who are currently experiencing difficulties with Microsoft Office SharePoint Server 2007 should contact their regular Microsoft Customer Support Services contact, or refer to"

Disposing of SharePoint objects correctly is a big problem in custom developed code, if your SharePoint implementation is constantly "Dieing" ie, after regular use the memory and cpu max out and you need to reboot your server to get things going again then its highly likely you are running custom SharePoint Object Model code that is not correctly disposing of objects causing memory leaks. The rate of memory leakage can be significant.

I have since this ugly problem rear its head in a number of projects I have been involved in. So yeah when you finally do fixup the problem and dispose of objects correctly you will notice the improvement of system performance and your server should run as if it has a simple vanilla install of SharePoint.

Another major problem with this is that.... These Dispose() rules are COMPLEX. The biggest problem faced is the difference in coding patterns depending on where your custom code is running.

ie. If your SharePoint OM code is running in a Web Part or Custom Control then you have access to the SPContext.Current object which is your starting point to get to your SPSite, SPWeb, SPList, SPListItem, SPFile etc. etc. its important to note that objects accessed from the current context should not be disposed of. The SPContext.Current.Site and its SPWebs that hang of it are singletons and should not be disposed as SharePoint makes use of these and will need to possibly use these objects after your custom code executes. That means the using(SPWeb =...) pattern will dispose of objects you are not meant to, you will get an error.

BUT - if you are running the code in a console app or 'out-of-context' then you should always dispose the objects as you are the one creating them.

Confused? Complicated? Yeh it is but it is important to understand the issues if you are writing custom SharePoint Object Model code.

Friday, 7 November 2008

SharePoint MVP Blogs OPML

If you're big on RSS and use it to keep track of the latest SharePoint news out there, then here's a link to the SharePoint MVP Blogs OPML.

My friend Jeremy Thake also has a nice collection of SharePoint links on his Diigo that he seems to update quite often. Here's the RSS feed for Jeremy's SharePoint Diigo links -

Thursday, 6 November 2008

Patterns & Practises SharePoint Guidance and Ramp-Up Program SharePoint for Developers

Microsoft Patterns and Practices - SharePoint Guidance

Guidance at a Glance
This guidance helps architects and developers build SharePoint intranet applications. The guidance contains a reference implementation (RI) that demonstrates solutions to common architectural, development, and lifecycle management challenges.

Ramp-Up !

( has just launched a brand-new learning track: SharePoint for Developers, Part I today.

Monday, 3 November 2008

Free Open Source CMS / WCM on WSS 3.0 - CompleteSharePoint.NET

My old buddy Tommy Segoro recently released CompleteSharePoint.NET a free, open source CMS / WCM system that sits on top of WSS 3.0

Tommy is a great buddy of mine and we've worked on some cool projects together in the past - Nice work Tommy! I miss working with Tommy because he's probably one of the fastest developers I have ever worked with.

Enabling the Word 2007 Developer Tab in the Ribbon to Always Show the Document Information Panel (DIP) When Opening a Document

Last Friday I went to a special Perth SharePoint User Group presentation hosted by William Cornwill of Microsoft. The presentation was excellent and provided a nice overview on Custom Content Types, Templates and Document Information Panel interaction between SharePoint and Word 2007. Awesome presentation!

One question that came up in the user group presentation that a number of people wanted answered was –

"How do I always force the Document Information Panel to show on opening a document"

I had some trouble with this a few weeks ago until I figured out that you can add the Developer Toolbar to Word 2007 which provides the facility to configure quite a lot in the document.

I came across this excellent blog post by Andrew Coates also another Australian Microsofty like William Cornwill – and just like William, Andrew presented at the Perth SharePoint UG a few months ago.

So to enabled the Developer Toolbar in Word following the steps in Andrew's post :

Enabling the Word 2007 Developer Tab

You basically go into Word 2007 options to enable the Developer tab in the Ribbon – fairly simple but it took me AGES to figure this out until I came across Andrew's blog.

After enabling the Developer Tab follow these steps to always force the Document Information Panel to show, click on the Developer Tab and then click on the last icon – Document Panel.

And then tick the Always show Document Information Panel on document on open and initial save checkbox to always show the DIP.

Its as simple as that! If you tick that checkbox and save the word document – and then use this word document as a Content Type template in a SharePoint Document Library – then every time a user creates a new document or opens a document they will be presented with the DIP showing.

UPDATE: You need to set this in the Content Type's settings page, there's a link to Document Information Panel Settings.

See -

The developer tab has a bunch of other useful goodies you can play with one of which is adding various content controls such as Picture content controls.

Another important function of the developer tab is Formatting quick parts. Have you ever wanted to change the date format of a Date Quick Part? Add a Quick Part to the page that is based on a Date and you get it formatted as dd/MM/yyyy.

With the quick part selected switch to the Developer tab and click the Properties button in the Controls section of the ribbon

You then have the following options available for configuring this Quick Part (Content Control).

Click Okay – and you now have applied a format to your Date Quick Part ! Other options available such as the Content cannot be edited forces users to always updated the DIP instead of the word document. Ie. By default users can type into quick parts/content controls in a word doc and changes are reflected in the DIP – with this option set users must edited this content in the DIP.

Another fine blog post on Andrew's blog that helped me recently is –

Linking Word 2007 Content Controls to Custom XML

Andrew gives a nice overview of how to make use of the Word 2007 Content Control Toolkit to manipulate custom XML stored in a word document, the tool allows you to add ANY custom XML to a document and then bind it to a Content Control.

Finally in summary I came across the following EXCELLENT resource if you are implementing this sort of advanced document management in SharePoint –

Using Office Open XML Formats to Support Electronic Health Records Portability and Health Industry Standards

By the Ted Pattison Group – if those guys are involved then you know this is going to be top class.

And the Visual Studio Solution for the article is downloadable here -

Tuesday, 28 October 2008

Cloud Computing - Announcing Azure Services Platform and Microsoft SharePoint Services

Ray Ozzie opened the PDC 2008 by anouncing Windows Azure - Microsoft's big solution to Cloud Computing.

To learn more about Azure go to -

One problem is the name, I think it sounds too much like Azureus -

Azure "Commonly it refers to a bright blue, resembling the sky on a bright, clear day"

"The term azure derives from the Persian لاژورد (lazhward), which was the name of a place in modern Turkestan known for its deposits of lapis lazuli (“stone of lazhward”). The word was adopted into Old French by the twelfth century.
From the French it was adopted into English as a near synonym for "blue". The first recorded use of azure as a color name in English was in 1374."

Other than the name, this is exciting stuff people and likely to be the way to do work in the not too distant future.

Tuesday, 14 October 2008

What are you working on Sezai ?

You may know me from my work with MOSS 2007 WCM Internet sites - which I enjoy working on a lot. MOSS 2007 is an AWESOME platform for powering an Internet site - no matter what the nay sayers say.

I have been involved in quite a number of varying and complex Internet website projects in the last few years - and I have learned quite a bit in the process.

So what is the next Internet site I am working on?

I'm NOT working on a WCM project!!!

I am working on a custom Document Management System. I am building a system to migrate a paper based Business Excellence Framework system into SharePoint.

What is a Business Excellence Framework or BEF ?

Read up on it here -

I must mention - if you come across an organisation that implements a BEF as a management system they are EXCELLENT candidates for SharePoint implementations.


They are already VERY organised and follow structured methods, including workflow, so they already have their act together and it makes a big difference implementing business processes - as their processes ARE ALREADY DEFINED AND PROVEN TO WORK !

Compare that to implementing SharePoint for a disorganised organisation - and yeah SharePoint won't automatically instill a sense of process and organisation if they don't have that in place already.

Sunday, 12 October 2008

PhotoSynth of the 2009 MVP Award Trophy

I bought a new Sony CyberShot Digital Camera yesterday and thought I'ld test it out by snapping some pics of the MVP Award and creating a PhotoSynth of it.

Check out the Synth Here -

Saturday, 11 October 2008

Designing SharePoint Implementations - Visio Templates and Stencils for SharePoint

When building any system for an enterprise it is best practise to initially scope the project to gather requirements and then commence writing a Functional Specification. The same should apply to SharePoint projects, no one should let you to start development without first designing and planning what you intend to build (I hope! ).

When designing and planning a system, a picture really is worth a thousand words. Good diagrams and illustrations can make a seemingly boring specification document into something that looks visually stunning and very appealing to the eye, more importantly good diagrams can impress project stake holders. A good looking diagram can also convey a lot more information to the reader with a lot less reading.

So what diagrams do you need?

The success of a SharePoint implementation depends a lot on the Infrastructure that is setup to support it. I have seen implementations result in failure in the past, not due to the SharePoint or development side of things, but because the infrastructure was poorly planned and cannot support the load that results from regular use of the system. So to help plan out the logical infrastructure you should check out this page on at Spence Harbar's blog -

and this -

Every SharePoint site collection is made up of a hierarchy of subsites. So to help document the structure of a site collection before you even start creating a site you need a Site Map diagram which clearly documents the hierarchy of subsites in a site collection. You can then go into further detail and list out any specific lists or libraries in the site and if needed annotate these libraries with information related to their use and security access. Have a look at this Visio Template on Maxime Bombardier's blog.

With the site map defined you then go in for a little more detail – in order to convey the functional differences between various pages in a site, you should put together some Wireframes of any important pages such as the home page and landing/welcome pages for subsites. Any highly custom pages containing custom web parts or server controls are also good candidates for producing wireframes. Any custom forms such as list edit forms or custom page layouts in edit mode that use custom field controls are also good wireframe candidates. Wireframes are excellent for conveying what each specific page does in the site and lets project stakeholders visualize the layout of pages – they may have ideas and preferences for laying out screens, it’s better for them to request these changes in the design phase instead of much later on when they’re already developed. Have a look at this Visio template -

and this one -

If your SharePoint implementation makes use of any custom workflow, then it may be worth illustrating these in a diagram as well. You can put together nice workflow diagrams to illustrate how workflow functions in the site. Have a look at these Visio templates - or any others that lets you document workflow process flow

Awesome - so now you have a set of diagrams clearly illustrating the logical infrastructure, site map / site structure, wireframes of important pages and how workflows… well - flow. A bunch of diagrams alone is not going to be a good spec. So you need to put these all together and start writing one.

If you are looking for a great example of a functional specification which makes use of nice Visio diagrams have a look AT THIS AWESOME FUNCTIONAL SPECIFICATION I came across prepared by Microsoft Consulting Services.

Happy documenting!

Always takes ages for me to make these diagrams and move shapes around though :(

I would also much rather be coding :)

If you come across any other nice Visio templates or stencils online - or any other good examples of Specifications for SharePoint Projects then please post a comment here to let me know about it !

Update -

Check out Jeremy Thake's Diigo for some more templates.

Sunday, 5 October 2008

I am a Microsoft MVP !

That's right - I got the news yesterday from Nick Ellery Aus/NZ MVP Lead - I have been awarded the MVP Award for 2009 which makes yours truly the only SharePoint MVP in Perth and Western Australia

It's been quite a journey working with SharePoint and it's great to get this award, I can now look back at all the time and effort I spent learning, working, blogging, writing and presenting with SharePoint over the last few years and it feels like it was all worth it.

Now that I have won the award I need to do more to pass on my knowledge to others to make their time working with SharePoint a little easier.

SO yes this blog has been RESURRECTED!!! Stay tuned for some long and detailed posts... Might be a few days before the first one, they take time to write :)

I also started at my new job last week - I now work for Ignia - Microsoft Gold Partners in Perth (so nice to be back on the terrace again). I am excited about this job as there's some really awesome projects lined up, but more importantly there's heaps of opportunity to grow and learn from some really capable and specialised .NET, CRM and SharePoint people.

Friday, 12 September 2008

Blog going into hibernation mode - no more blogging for a while

Until further notice I won't be blogging any more and this blog is going into hibernation mode.

It's been fun blogging but I need to spend more time on other things and may decide to start up another blog months (years?!) from now....



Tuesday, 12 August 2008

The New Central TAFE Website - Powered by MOSS 2007 developed by the Vivid Group

Vivid Group finished development of a new website for Central TAFE, which is one of the TAFE colleges in Western Australia.

Check it out here -

The site contains font resizing, print friendly mode, RSS, Videos and more.

A custom course search was also developed which searches across Central TAFE's course database.

Wednesday, 18 June 2008

Perth SharePoint User Group Presentation June 2008

I presented at the June 2008 Perth SharePoint User Group meeting.

The topic was - Optimising MOSS 2007 for the Internet

The turnout was great, standing room only and the presentation went very well.

You can download the presentation here

I demoed customising Master Pages and Page Layouts and inheriting from custom base classes which allow you to add advanced custom functionality.

The easiest thing to implement is BlendTrans meta tags in your master page which stop refresh flicker in IE. These are great and were mentioned in the SharePoint Team Blog Post we wrote recently.

I first learned of these awesome BlendTrans tags from Stefan Sedich who sits next to me at work.


The VS Project Templates used for the presentation are based on these -

Thursday, 5 June 2008

Publishing Feature Properties

Various Features referenced in ONET.XML site definition files can be activated with Properties.

One example is the publishing feature which makes use of properties like ChromeMasterUrl, AvailablePageLayouts, SimplePublishing etc. etc.

I've tried looking online for a listing of these feature properties but there's not much out there.

One example I found was someone making use of a EnableApprovalWorflowOnPages feature property.

So where can I get a full listing of the properties I can specify in ONET.XML ?

I fired up Reflector and had a look into the Publishing Feature Receiver code and came up with the following list -


Some property names are descriptive enough to work out what they do.

Tuesday, 27 May 2008

List of SharePoint Features with GUIDs

I came across this useful page which lists out all the MOSS 2007 Enterprise Feature names, their GUIDs and scope.

Hopefully I won't have to go hunting through the Features folder in the 12 Hive as much to track down feature names and guids.

Friday, 2 May 2008

National Native Title Tribunal - MOSS 2007 WCM Website Launched - Developed by the Vivid Group

We've finally finished development and launched the NNTT website -

Check it out ! It's the largest and most complex MOSS 2007 project we have been involved in to date.

This website proves MOSS 2007 as an Enterprise WCM platform the website contains over 20,000 pieces of content in the form of publishing pages, documents of various types and data integrated from back-end systems.

I thought I would write this quick blog post because others are linking to the website already -

Special Thanks go out to the people at Vivid Group that made this project a reality -

Richard Bloodworth - Project Manager and a very patient man :)
Tommy Segoro - Tommy developed entire sections of the site including ALL the mailing list integration with Microsoft CRM, InfoPath and also significant work on Master Pages, Page Layouts, Content Types, Site Columns and other advanced functionality such as flash integration, font-switching, print mode and text mode.
Mark Payne - Implemented and developed advanced custom approval workflow for managing the publishing process. If Mark wasn't on the job we'ld still be working on the workflow now!
Damian Worrad - Damian put together the Business Data Catalog application definition which is used to integrate back-end systems data.
Me - Page Layouts, Content Types, Site Columns and custom lists as well as all the custom search pages.
The Design Team - Brad Carpenter, Simon Mateljan, Jonathon King and Will "FLASH" Harvey - These guys did all the design work, html, flash and pretty stuff, the site looks awesome thanks to them.

I'ld also like to mention Gerald De Run ( who helped us to implement advanced caching and reviewed our code to help refactor it to significantly increase performance, scalability and better memory usage. Thanks Gerald !

Last but not least I would like to thank the professional staff at the Tribunal who pushed us to produce such an awesome website with great functionality.

That's it for now - We have plans to do a detailed "how we did it" blog post which will feature on the SharePoint Team Blog and there are plans underway for a detailed Case Study.

Thursday, 3 April 2008

Our First - Visual Studio 2008 - ASP.NET 3.5 - LINQ to SQL - ASP.NET AJAX Site Goes Live!

The latest technologies... and no I had nothing to do with the developing the site, I just sit next to one of the guys, Stefan Sedich who built it.

He's blogged about it on his blog ----->

Sunday, 10 February 2008

How your permissions affect what you can see

When logged in to a SharePoint site as different users you have different options available to you depending on the site group you are in and the permissions that you have.

Here's a simple overview of why -

Tuesday, 5 February 2008


I recently had a look at a great new SharePoint developer tool on CodePlex called STSDEV

It's excellent and generates SharePoint code for you, it will also save a lot of development time. I advise all SharePoint developers to watch the video's on this page

Start with -

1. STSDEV_01_Introduction.wmv: A basic introduction to the STSDEV utility which covers setup and usage including an exploration of the basic Visual Studio project structure that is generated for all STSDEV-generated solutions. You should view this screencast before any of the others.

Monday, 4 February 2008

Learn to talk to your CFO in their language - SharePoint 2007 Project Costing, Feasability, Planning and Governance

My good friend "Mr Cleverworkarounds" (I call him that because of his awesome blog - has completed a series of articles where he transforms analysis of technical considerations into a costing model that will make sense to a CFO (Chief Financial Officer).
What am I talking about?
How much will this SharePoint 2007 project cost?
How much will this SharePoint 2007 project make/save me in the future?
When implementing massive SharePoint 2007 Projects there is a great deal of risk involved. SharePoint is great software, but at the end of the day its all about money, what is more important is how much will it cost? and how much will it make/save me in the future, you may not care about this if you are a technical person, but I bet management and the people paying you to work with SharePoint do!

Here's a rundown and the links, keep an eye out for my name in the WCM Scenario :)
Assessing the value of an investment, the time effect on money, the concept discount cash-flow and some of the related calculations like Net Present Value (NPV) and Internal Rate of Return (IRR)
Introduction to the various scenarios over this series Collaboration, WCM and Web Application. Explanation of methodology used, and assumptions made
The Collaboration Scenario
The Web Content Management Scenario
The Custom Web Application Scenario

Small Font Size in SharePoint Discussion Board

This has come up in a few SharePoint sites I have worked on, and I am not the only one experiencing this issue. This is a common issue which sometimes occurs when using a custom Master Page and custom Style Sheet in a site. I’ve seen this occur on at least 2 or 3 separate sites using non-default master pages and page layouts. The font size displays with 0.7em, you need to override it so its at least 1.0em

To fix this you need to identify the SharePoint CSS classes which are setting the Font size, I like to use the FireBug plug-in with Firefox (right-click and Inspect Element) to identify the overrides required then implement the CSS overrides in your custom Style Sheet to increase the font-size.

Vivid Group Launches Another MOSS 2007 WCM Public Internet Website -

Features :
Low page weight, no core.js - This makes the site faster than most MOSS 2007 WCM websites
Completely custom Master Pages and Page Layouts primarily comprising custom server controls (including custom navigation controls) and SharePoint web controls
Font size switching, page print mode
Custom Search Center, Site map page
Random "Our People" (staff profiles with images) featured on home page, randomly loaded from a site list
Latest News and Upcoming Events on home page automatically rolled up from most recent dated pages in news and events subsites respectively.
Most of the website is configurable via use of site lists, including header and footer links, home page service profiles and facility features
Service Profile Pages ( hooked into Facility Features site lists with the use of Lookup Fields, to make editing content easier.
Developed in record time =oP with the use of a custom site definition ( well 2 custom site defs if you count the custom search center custom site definition ), custom list features, content type binding features, List Lookup Field re-creation, fields and content type features, master page and page layout features, custom site provisioning of sites and pages from an XML file etc. etc.
The best part of it is, it's all in source control, which helps provide greater re-use of code in future projects.

A nice easy MOSS 2007 WCM Project, a simple site without too many content types, or too many page layouts. Still, the site shows off what MOSS 2007 WCM can do, the site architecture is primarily built on custom site lists, and page layout content types and it makes use of Search.

Special Thanks to the great team at Vivid Group, especially -
Leah Dent (Project Manager)
Matt Cahill (System Planning and MOSS Farm Hosting Environment Infrastructure Setup)
Brad Carpenter (Designer)
Simon Mateljan (Designer)
Jonathon King (Designer)

Locking Down Styles in the MOSS Publishing HTML Field Control

In SharePoint Designer, open a page layout and select a HTML field controlYou should then be presented with a series of properties in the Tag window.There are a series of AllowBlahBlah properties which you simply set to false if you want that specific validation enabled on the field control.You can also set these properties in code view on the page layout
Descriptions of these field control properties from the MOSS SDK -

Gets or sets the constraint that allows external URLs in the HTML when validating the value in this RichHtmlField object.
Gets or sets the constraint that allows font element tags to be added to the HTML.
Gets or sets the constraint that allows heading tags to be added to the HTML.
Determines whether you can switch the HtmlEditor object into a mode where the HTML can be edited directly.
Gets or sets the constraint that allows hyperlinks to be added to the HTML.
Gets or sets the constraint that allows image tags to be added to the HTML.
Gets or sets the constraint that allows list tags to be added to the HTML.
Gets or sets the flag that enables the reusable content picker button when editing this field.
Gets or sets the constraint that allows table handling tags to be added to the HTML.
Gets or sets the constraint that allows explicit text markup tags, such as bold and italic, to be added to the HTML.
What happens when they are set to FALSE?Eg. If I set AllowFonts="False" and AllowTextMarkup="False"It disables the font and text colour buttons on the HTML Editor.
If a content author pastes in HTML with Font tags or text mark-up in the field control and now attempts to save or check in the page :You get this on the Page Editing Toolbar -
And the HTML Field Control now contains an Auto Correct button and a message related to ‘unsupported formatting’Now simply click the Auto Correct button, and the content is cleaned up client side with javascript, nice What happens to the HTML?BEFOREFONT color=#ff8000 size=5>WesTrac has a huge range of reliable low hour used equipment, all meticulously prepared for resale. If you can’t find exactly what…AFTERWesTrac has a huge range of reliable low hour used equipment, all meticulously prepared for resale. If you can’t find exactly whatOne more thing…If you set any of these properties to false it won’t automatically go through and clean-up the content in your site, but if a page contains content with these tags, the next time a content author edits the page and tries to save or check-in this validation will kick-in and it won’t let the user save the page unless they click the button to clean up the HTML.
Copy and Pasting Content from Word DocumentsYou can still paste in content from Word Documents, and this won’t automatically clean-up that HTML, these settings only seem to affect explicit font tags or other text markup, not in-line styles…
You get the following icon showing up in the field control You can also access remove inline styles from the floating tool-bar BEFORE

Sezai’s pasting this content in from word!


Sezai’s pasting this content in from word!

ConclusionThere is no AllowStyles or AllowInlineStyles property! That’s dumb because I can paste in content from word that is setting Font and Font Colour with inline styles !That means even though I have set the following properties to false AllowFonts="False" and AllowTextMarkup="False" I can still set different fonts and font colours in Word, then paste it into a page, and save and check-in the page !!! and MOSS will let me… you need to remember to always click the Remove Inline Styles explicitly.

Creating a Standards Compliant MOSS 2007 WCM Public Internet Website With Low Page Weight

The standards compliant and small page size MOSS 2007 websites keep rolling out -
Some of you may wonder how in heck are people making MOSS 2007 render these sites with such small page weight, that are compliant?
We're currently developing a Federal Government website that is required to be XHTML Compliant and we ( have spent heaps of time investigating various ways to reduce page size and unnessesary rendering.
A public WCM website rarely needs to make use of web parts so you don't need most of what is in the HTML of a standard MOSS master page such as that 200kb+ Core.JS! Why make everyone who browses to a site download 200kb .JS file that they don't need or use! That's just dumb.
You can simply wrap and hide most MOSS CSS and JS references using a custom panel control so they don't render when the user is anonymous, a SPSecurityTrimmedControl can also be used for this purpose. You still need all of that SharePoint JS and CSS if the user is authenticated and authoring, so the Site Actions, PET and Field Controls render and function correctly, but all that heavy JS and CSS is not required for the anonymous user.
The Master Page and Page Layouts are developed from a minimal.master (that has been further minimalised) and starts off completely empty and FULLY compliant, then start adding field controls and custom controls. All controls make use of the MOSS object model to get data from Page Fields for content specific to the page and Site Lists which provide an easy way for content authors to configure common elements across all pages in the site, like header and footer links. Ensure each custom control added renders its html nicely and doesn't break compliance in the page! You can also do some funky .NET code in Master Pages and Page Layouts to further strip out HTML on rendering to have extra control to ensure compliance for the anonymous user.
Think about page 'Modes' to help make it easy when developing, the anonymous user just needs a simple html page, where as someone running the site and authoring content needs all the SharePoint stuff to work. You can check the page mode programatically and also make use of Edit Mode Panels to control rendering in edit mode and display mode.

1. Edit Mode and Authenticated
In Edit mode authors need to be able to interact with field controls on the page to change content on the page. You also need the Site Actions menu, PET, and the SharePoint JS and CSS to be in the page for the author to do their job. You can forrget now about making Edit Mode XHTML compliant, but that's okay because the public won't ever see edit mode, only the web authors will, and this page doesn't need to be compliant, it needs to primarily be functional to facilitate entering content and configuring the page, so feel free to use whatever html you want to. Page size will also be massive with core.js but that's okay
2. Display Mode and Authenticated When the author checks-in the page after editing or they browse through the site authenticated they aren't presented with field controls, but with a page that looks fairly similar to what the anonymous users will see, with important exceptions, the Welcome Sign-In, Site Actions menu, PET and the SharePoint JS and CSS must be in the page for the author to do their job. Depending on security, this mode will see present the current edited page that is pending approval, so authors can trigger page workflows by clicking the PET buttons to approve pages.
3. Display Mode and Anonymous
Must be compliant, with nice html and small page size. You don't need any of that SharePoint JS or CSS, and the anonymous user defanetly aint gonna be clicking the site actions menu, PET or entering content because they won't be there! This should render as close to the HTML/CSS Design provided by the Designer (which should probably be compliant!) If you are still having problems with compliance, you can also kick in some further in-line custom .NET code in the Master Page to further manipulate the HTML rendered by overriding the Page.Render method.

So you basically need to build three seperate and independant web interfaces, by developing with page modes in mind it frees you to do what is required for that specific page mode, I have previously been frustrated with MOSS WCM Development and trying to produce clean html while still, at the same time make all the SharePoint controls function correctly, by thinking about page mode you can free yourself of the dirty rendering that OOTB SharePoint web controls when in anonymous mode and get rid of dependencies on MASSIVE un-needed JS and CSS that fatten the page size. If you are building a public internet web site, then page size should be small with simple html, css and js so that its FAST, because no one likes a SLOW website!
A problem with this approach outlined is it involves extensive development work on custom .NET controls, you need to build a lot more yourself, because guess what! The OOTB search center needs that SharePoint JS for buttons and stuff to work :( and all the Search controls are Web Parts, So you need to build a Custom Search Center site yourself that uses custom page layouts with no web parts.
I'm a big fan of going fully custom, because in the real world requirements for a standards compliant public Internet website aren't met by MSFTs cookie-cutter approach to MOSS web controls, and page rendering, you can save time when developing with custom controls because trying to configure and mess with sharepoint web controls and web parts will waste a lot more time than coding simple controls that use the object model to get Page Field data and Site List data, and then render what you want them to (for me anyways) BE CAREFUL!!! custom code means you can potentially code something nasty that will hammer sql or the cpu, be sure to dispose of objects properly. If you write custom controls you need to take responsibility for their efficiency and what they do to server resources. Also remember to enabled BLOB cache to further improve performance and try and investigate application caching when custom controls take long to do their work to get the data they need to render.
Lists can help improve productivity compared to classic ASP.NET development against a database data layer, I love lists because of all the cool free stuff that comes with them, but that development time saved is quickly eaten up by a lot of the other time wasting aspects of MOSS 2007 development such as deployment. Win Some Lose Some.

Some Code
How do you tell if you are in edit or display mode?
Get SPContext.Current.FormContext.FormMode and check this against the Microsoft.SharePoint.WebControls.SPControlMode enumeration.
How do you tell if the user is authenticated?
For an example see the RegisterCoreWhenAuthenticatedControl here

More Linkage
Excellent and Inspirational Blog Posts on MOSS 2007 Compliant websites, with heaps of steps I followed!
Blog Post on using custom HTTP-Filter to clean HTML output to reduce page size and possibly enforce compliance,guid,968b0588-f306-467b-be51-54f7a8f2079d.aspx
see sections Get the Space Out – Reducing Page Size Over the Internet Pipe JavaScript Weight Reduction – The Client Browser
How to Optimize a SharePoint Server 2007 Web Content Management Site for Performance
Definetly something to look out for AKS Accessibility Kit for SharePoint -

Going Down The Rabbit Hole - The MOSS 2007 Publishing Site Definition

It has been well over a year since I started developing on MOSS 2007, I started development with just using SharePoint Designer, and manually deploying assemblies and artifacts without features and solutions.
Soon after I realised the trouble and pain you could get yourself into if you don't use the feature and solution framework. In the aim to work 'fast' and finish your development tasks quickly, you can fall into a massive trap and realise that although it takes plenty of effort to develop Features, in the long term you are better off because of RE-USE of features and ease of DEPLOYMENT. All developers love reusing their work, it saves time in the long run, and you don't have to constantly re-do the same thing like a robot. When you deploy you customisations to a production system, you don't always have SharePoint Designer available to hookup to the site, and you don't want to have to remember a dozen manual steps to repeat, more robot action, it also leaves room for human error, and the Network/Systems Admin guys won't be happy with you, they want an atomic deployment process.
You can go one step further, develop your own Custom Site Definition, so you can allow users to create *custom* sites pre-populated with your Lists and other files, and the sites can have YOUR features enabled AUTOMATICALLY, sounds nice hey?
In the last few months I have been doing just that, so I thought I would document the following to help myself (and now YOU) understand what happens when sites are created in SharePoint and how the Features are enabled.

So what actually happens when you create a new Publishing Site ?Whenever you create any site in SharePoint, XML files in the 12 Hive are used in the process to create the site, the various XML files contain information and settings needed to provision sites as well as references to dependent Features that are also activated on Site Collection creation or Web Creation. The Folder ’12-hive’\TEMPLATE\1033\XML Contains the file webtempsps.xmlThe file contains some of the following related to Publishing Sites, the BLANKINTERNETCONTAINER template is used to create a new Publishing Site Collection
What is VisibilityFeatureDependency ?
There are Feature IDs referenced in the VisibilityFeatureDependency attribute
The F6924D36-2FA8-4f0b-B16D-06B7250180FA Feature ID refers to the PublishingSite feature and Feature ID 97A2485F-EF4B-401f-9167-FA4FE177C6F6 refers to the BaseSiteStapling feature. F6924D36-2FA8-4f0b-B16D-06B7250180FA - PublishingSite
This is the PublishingSite feature. This feature does nothing more than Activate four other features, it has the following ActivationDependencies
More feature IDs to lookup !A392DA98-270B-4e85-9769-04C0FDE267AA - PublishingPrerequisites
This is the PublishingPrerequisites feature which hooks up a Feature Event receiver. AEBC918D-B20F-4a11-A1DB-9ED84D79C87E - PublishingResources
This is the PublishingResources feature which provisions Site Columns, Content Types, Files and Resource settings
89E0306D-453B-4ec5-8D68-42067CDBF98E - Navigation
This is the Navigation feature which provisions custom actions and controls for Navigation D3F51BE2-38A8-4e44-BA84-940D35BE1566 - PublishingLayoutsThis is the PublishingLayouts feature which provisions files into the site. It provisions all Publishing Page Layouts, Master Pages, Page Layout Preview Images, Style library Images and Style Library CSS 97A2485F-EF4B-401f-9167-FA4FE177C6F6 - BaseSiteStapling
This is the BaseSiteStapling feature, it will staple several features to site definitions listed in the feature, it contains dozens of FeatureSiteTemplateAssociation nodes, it is interesting to note that :
Feature B21B090C-C796-4b0f-AC0F-7EF1659C20AE (BaseSite) is stapled to the following site templates :STS#0 , STS#2 , MPS#0 , MPS#1 , MPS#2 , MPS#3 , MPS#4 , WIKI#0 , BLOG#0 , BDR#0 , EAWF#0 , OFFILE#0 , OFFILE#1 , PWA#0 , PWS#0 , SPS#0 , SPSMSITE#0 , SPSTOC#0 , SPSTOPIC#0 , SPSNEWS#0 , SPSNHOME#0 , SPSSITES#0 , SPSBWEB#0 , SPSCOMMU#0 , SPSREPORTCENTER#0 , SPSPORTAL#0 , SRCHCEN#0 , PROFILES#0 , CMSPUBLISHING#0
The BaseSite Feature is an ActivationDependency feature and activates the following Features LocalSiteDirectorySettingsLink Feature LocalSiteDirectoryControl Feature PortalLayouts Feature WebPartAdderGroups Feature
Feature 99FE402E-89A0-45aa-9163-85342E865DC8 (BaseWeb) is stapled to the following site templates :STS#0 , STS#2 , MPS#0 , MPS#1 , MPS#2 , MPS#3 , MPS#4 , WIKI#0 , BLOG#0 , BDR#0 , EAWF#0 , OFFILE#0 , OFFILE#1 , PWA#0 , PWS#0 , SPS#0 , SPSMSITE#0 , SPSTOC#0 , SPSTOPIC#0 , SPSNEWS#0 , SPSNHOME#0 , SPSSITES#0 , SPSBWEB#0 , SPSCOMMU#0 , SPSREPORTCENTER#0" , SPSPORTAL#0 , SRCHCEN#0 , PROFILES#0 , CMSPUBLISHING#0
The BaseWeb Feature is also an ActivationDependency feature and activates the following Features
RelatedLinksScopeSettingsLink Feature AnalyticsLinks Feature FeatureStapling Feature

Feature 541F5F57-C847-4e16-B59A-B31E90E6F9EA (NavigationProperties) is stapled to the SRCHCENTERLITE#1 site template with the following properties within the FeatureSiteTemplateAssociation

Which explains why the Search Centre Lite Navigation is different to navigation in all other site templates!
We have now traced through the VisibilityFeatureDendencies in webtempsps.xml, let us now get back to this file and continue this journey down the rabbit hole by exploring the SiteTemplates referenced.
The Folder ’12-hive’\TEMPLATE\SiteTemplates Contains a folder for each Site Template in the site. One such folder is BLANKINTERNET which contains an XML folder that contains a ONET.xml file.
This file contains the following configuration nodes, which contain Feature ids, so even more features can be activate on site creation, there are Site Features activated on Site Collection Creation and Web Features activated on Web (sub-site) Creation. NOTE : THIS SPECIFIC CONFIGURATION HAS SITE FEATURES AND WEB FEATURES Publishing Site Features
The following are site features activated on Site Collection creation
C85E5759-F323-4EFB-B548-443D2216EFB5 ExpirationWorkflow Feature
02464C6A-9D07-4F30-BA04-E9035CF54392 ReviewWorkflows Feature6C09612B-46AF-4B2F-8DFC-59185C962A29 SignaturesWorkflow FeatureC6561405-EA03-40A9-A57F-F25472942A22 TranslationWorkflow FeatureA392DA98-270B-4e85-9769-04C0FDE267AA PublishingPrerequisites Feature7C637B23-06C4-472d-9A9A-7C175762C5C4 ViewFormPagesLockDown FeatureAEBC918D-B20F-4a11-A1DB-9ED84D79C87E PublishingResources FeatureF6924D36-2FA8-4f0b-B16D-06B7250180FA PublishingSite Feature7AC8CC56-D28E-41f5-AD04-D95109EB987A OSSSearchCenterUrlSiteFeature Feature Publishing Web Features
The following is a list of all Web Features in the onet.xml file00BFEA71-DE22-43B2-A848-C05709900100 CustomList Feature00BFEA71-E717-4E80-AA17-D0C71B360101 DocumentLibrary Feature00BFEA71-52D4-45B3-B544-B1C71B620109 PictureLibrary Feature00BFEA71-A83E-497E-9BA0-7A5C597D0107 TasksList Feature00BFEA71-4EA5-48D4-A4AD-305CF7030140 WorkflowHistoryList Feature22A9EF51-737B-4ff2-9346-694633FE4416 Publishing Feature541F5F57-C847-4e16-B59A-B31E90E6F9EA NavigationProperties Feature94C94CA6-B32F-4da9-A9E3-1F3D343D7ECB PublishingWeb Feature

This investigation demonstrates what actually happens when you create a publishing site in MOSS 2007. In summary, a series of features are enabled on the site collection, in a specific order. Features are also enabled when creating subsites.Why do we need this information ?

To create YOUR OWN Custom Publishing Site Definitions, so you have full control over what features are activated in your site, you can get into trouble if you do not activate features in the correct order, such as activating a feature that contains Page Layouts referencing a Content Type, if the Page Layout feature is enabled before the Content Type feature then the pages created will not be created correctly because of the dependency issue.

Extend The PublishingLayoutPage Class - Create Your Own to Run Code in the 'Page'

This is powerful stuff, and thanks to this I can do a lot more powerful MOSS WCM custom development.
This will let you run your own custom code in the context of a page.
Do you miss putting code in the Page? I do!
This will kinda give you back some of that 'lost power'. (awesome post that started me on this!)

You may notice that all MOSS WCM Page Layouts start with the following Inherits="Microsoft.SharePoint.Publishing.PublishingLayoutPage,Microsoft.SharePoint.Publishing,Version=,Culture=neutral,PublicKeyToken=71e9bce111e9429c"
So if you create your own custom class, which inherits from PublishingLayoutPage you can then define your own methods and properties in it, do page level code like we used to do in MCMS !
You then switch the reference in you Page Layouts to use your new custom PublishingLayoutPage as described in Janne Mattila's EXCELLENT post.
I have tried this out and it works like a charm, I can now run code code when the page initialises, such as switch the Master Page used on loading the page, awesome.

Many Custom PublishingLayoutPage Classes, One for Each Page Layout ?
If you develop your own custom PublishingLayoutPage class then you can reference it in All your custom Page Layouts. The same custom code will now run in All Page Layouts.
To go one step further, develop many custom PublishingLayoutPage classes, one for each page layout you have, you can then run independent code for each Page Layout!
Even create your own Base PublishingLayoutPage class and inherit many custom classes from your base, this will give you the ability to run independent code for each page layout, AND also run common code for all Page Layouts in your Base PublishingLayoutPage class.
The possibilities are endless. My only regret is not trying this out sooner =o(


SPContext.Current.FormContext is my new best friend !

FormContext has this super Method
1. SetFormMode Use it to change the current SPControlMode (haven't tried this out)

FormContext has two awesome Properties
1. FieldControlCollection - Get a collection of the Field Controls.
2. FormMode - Get the Current SPControlMode

What is SPControlMode?
Editing content in a MOSS Publishing Site is done “in context” ie. You navigate to a page, and “Edit” the page, after which the page "mode" switches and you are presented with data entry controls that let you enter data into page fields.

So a Page can be in different modes, very similar in concept to how MCMS 2002 functions.

So we need a nice way to determine the “SPControlMode” programmatically in custom code so we can control rendering (do cool stuff) when in different modes.

The SPControlMode enumeration contains these values -
Display, Edit, Invalid and New

Some example CODE that makes use of FormContext.FormMode -
' If Me not in Display Mode, Hide Me
If (SPContext.Current.FormContext.FormMode <> Microsoft.SharePoint.WebControls.SPControlMode.Display) Then
Me.Visible = False
End If

Feedback from the August Perth SharePoint User Group Meeting

I presented a session on MOSS 2007 WCM at the August Perth SharePoint User Group Meeting

Here is some feedback I have received since :
“The guys came back from your talk impressed with your depth of knowledge and experience on SharePoint.”

"I heartily endorse this product or service"

“It was a bit boring first 15 mins (it was just like Microsoft promotion) but the rest was fun. You did very well with Q&A at the end I think. Great job!”

"Man, this MOSS 2007 is the best thing since sliced bread, I guess that makes you a Bread Maker or some other type of Bread Machine?"

“its nice to see someone as passionate about MOSS and .NET development as you are.”

“Sezai, Sezai your so fine, you’re so fine you blow my mind, Go Sezai !”

“It was great to meet someone who is so enthusiastic and passionate about his work.”

"Dude, you are so sad, you need to find something else to get excited about instead of software, especially Microsoft software - Uber Nerd !"

“You are the Steve Irwin of SharePoint.”

It's hard work being such a Guru/Expert/Boffin/Grand Master/Legend in MOSS 2007 WCM, but someone has to do it !

Manage Solution Development Easier and Faster

When you develop a Solution in Visual Studio 2005 for WSS 3.0 / MOSS 2007, you need to build everything into a Solution package using MakeCab.exe
This is done by manually updating two files, Manifest.xml and the .ddf file. So whenever I need to add a new file to a feature, or a new assembly, or anything new I want deployed with the solution i need to manually edit and update the Manifest.xml and the .ddf file.
This can be time consuming !
Then I came across this on Code Plex - WSP Builder built by the Carsten Keutman
If you setup your Visual Studio Solution folder structure to match the '12 hive' then this baby will generate a new solution ID, the Manifest.xml for you as well as the .wsp !
No more manually creating the manifest.xml file.No more manually specifying the DDF file.No more using the makecab.exe application.
Therefore you do not need the knowledge of how to create a solution manifest.xml and wsp file any more.

AND ....
Head over to ACs blog! He has just started a new 5-part series about saving even MORE time when working with features and solutions.
Part 1: Announcing AC's VS CodeRush/Refactor Tools for SharePoint Devs
Although you need to purchase CodeRush/Refactor first, but if it will save me time, and make MOSS 2007 Custom Development easier, then it's worth considering purchasing the awesome tools.

Save Time => Increase Productivity => Get More Work Done => =o)

Sezai is Presenting at the August Perth SharePoint User Group Meeting

Details are here :

Event Information
Perth SharePoint User Group
Web Content Management in Office SharePoint 2007
Date and Time:
Tuesday, 21st August 2007 - 5:00 pm(GMT +08:00, Perth)(3rd Tuesday of every month after May)
Microsoft Perth – Presentation RoomLevel 14, QV1 Building ( St George’s Terrace, Perth

Event Information



Perth SharePoint User Group

Web Content Management in Office SharePoint 2007

Date and Time:

Tuesday, 21st August 2007 5:00 pm
(GMT +08:00, Perth)

(3rd Tuesday of every month)


Sezai Kömür


1 hour


MOSS 2007 is a powerful platform which can be used to provide a wide range of solutions. One of which is to use MOSS 2007 as a CMS to power a public Internet website. Microsoft has discontinued it’s previous CMS product, MCMS 2002 (Microsoft Content Management Server) and specifies MOSS 2007 as the upgrade and migration path for existing MCMS websites.

This session will provide an overview of the WCM features in MOSS, and what is required to develop a custom public Internet website solution powered on MOSS.

The session will be led by Sezai Kömür, Senior Developer at Vivid Group.

Sezai Passes Exam 070-542 - Microsoft Office SharePoint Server 2007 Application Development

YES I did it !

I just passed the MOSS 2007 development exam with a score of 959 / 1000 !

I completed the 3 hour exam in only half an hour.

For preparation I searched the internet and read other similar blog posts, then did what they did as far as getting test exams, and then studied the night before for about 5 hrs.

I might do one of the other WSS / MOSS exams to get MCTS SharePoint.... it would be nice to put into my email signature.

The Exam

Visit this it broadly describes what the test is about.

I think the exam is tough because MOSS is MASSIVE, and depending on your experience in developing solutions, you might only have worked with one slice of the MOSS Pie?(

The MOSS Pie, mmmm pie

You might have only been involved in an Intranet project, or only a public internet wcm project etc. Depending on the specific MOSS solution, a single project would not make use of the entire pie.

Records Center, Information Management Policy, Excel Services and some InfoPath questions were tough because I haven't done as much custom dev in those areas, it was good to study for the exam because I now know more about MOSS as an entire development platform.

So the best advice I can give is focus on all of the Pie slices of MOSS especially the Pie slices with which you have had least experience working with. Mastering only one Pie slice won't be enough to pass. Eat the whole Pie, leave no slice untouched! Mmmmm Pie.

Still it was a tedious exam because a lot of the questions tested whether or not you know specific declaratives, methods and properties (meh what else would they test in a development exam?). Why, but why did I have to memorise the different nodes and structure of a BDC application definition? that wasn't fun at all.

When anyone is developing with Visual Studio .NET working on a MOSS development project in the real world, you have fast and easy access to information like this, you can easily look through the MOSS SDK or other documentation. With the advent of intelisense, classes that have methods/properties with comments, and due to the general size of the MOSS API, every developer wouldn't naturally try to wrote learn the entire class reference !

This leads me to believe exams are not a good way to test the ability of a developer, you can only learn this about someone by working with them for a while, the proof is in the work they produce.