Presentation is loading. Please wait.

Presentation is loading. Please wait.

Microsoft Patterns and Practices SharePoint Guidance Robert L. Bogue MS MVP, MCSE, MCSA: Security

Similar presentations


Presentation on theme: "Microsoft Patterns and Practices SharePoint Guidance Robert L. Bogue MS MVP, MCSE, MCSA: Security"— Presentation transcript:

1 Microsoft Patterns and Practices SharePoint Guidance Robert L. Bogue MS MVP, MCSE, MCSA: Security Rob.Bogue@ThorProjects.com

2 Where are we today?

3 Where are we today (for real)? There are relatively few SharePoint Developers today We have free training that MS provides at http://mssharepointdeveloper.com http://mssharepointdeveloper.com – Hands on labs – Presentations – Demos (code) … but we don’t have best practices

4 Who are the Patterns and Practices Group at Microsoft?

5 The Scenario – Training Management Corporate Training is a big deal. – It needs tracked for personnel reasons – Budgeted for accounting reasons

6 How do we Deploy Solutions? SharePoint Solution (WSP) WSPs are to SharePoint like MSIs are to Windows WSPs deploy correctly across the farm WSPs deliver assemblies, pages, and features

7 When should I create a Site Definition? When you need to distinguish a site for future changes When you start so you can differentiate between your sites and OOB sites See: How to Use Site Definitions in SharePointHow to Use Site Definitions in SharePoint

8 How should I make a Site Definition? Make it an empty shell Create all of the functionality for the Site Definition as features Use Dependencies to have the features activated when the site is created See: SharePoint 2007 Web Content Management DevelopmentSharePoint 2007 Web Content Management Development

9 How do I make changes to a Site Definition? Design additional Features Feature staple the feature to the site definition

10 What is Stapling? Allows you to specify a feature that must be activated when a site is created with a definition – without changing the definition What it doesn’t do … activate a feature on existing sites so… Write a feature receiver to activate on the existing sites.

11 When to use Site Templates? When you want to allow users to make changes to the predefined content User interface can create them (no development tools required) Can be globally deployed via STSADM command

12 Lists Definition vs. Content Types List Definition – Specify fields – Specify forms – Specify views Content Types – Specify fields – Specify forms

13 What do we do about branding? Themes – Use Include Master Pages – For core controls that must be on every page Web Part Page – Layout of controls (web part zones) Page Layouts (MOSS Only) – How the pages lay out content

14 Where do you store configuration? Web.Config? – How do you manage across servers? SharePoint API – What do you do when the SharePoint Web.Config modification API is flaky? SPPropertyBag is on ALL SPPersistedObjects (SPFarm, SPWeb, etc.)

15 Creating Content Types Every Content type gets a unique ID The Unique ID has GUIDs in it… Creating Content Types from the UI causes unique GUID Creating from the API creates new GUIDs

16 Modifying Content Types The product team says… don’t overlay the file, use code to programmatically change I say… update your Content Type XML and use a feature receiver to propagate

17 Managing Process: Event Receiver vs. Workflow

18 SPList vs. Database Table SPList – User controllable fields – User controllable views – Export to Excel – Alerts Database – High performance – Large scalability

19 Custom ASPX pages Need to Inherit from a class (think ASP.NET 1.1) Need to have 5 part name (class + 4 part assembly) for the class to inherit

20 RenderContents vs. CreateChildControls Render/RenderContents = BAD – ASP approach – No events – No multi-device support CreateChildControls – ASP.NET Approach – PostBack, ViewState, etc. – Multi-device support

21 How do I manage Dev-Test-Prod? Code moves from DEV to TEST to PROD Content moves from PROD to TEST (and rarely to DEV) See: Managing the Code when Customizing SharePointManaging the Code when Customizing SharePoint

22 Updating Assemblies The assemblies are often loaded by four part name… – Name – Version – Culture – Public Key Token The four part name is in the content DB (which you can’t modify directly)

23 Unit Testing It’s hard Objects are sealed and have internal constructors TypeMock can be used… You can isolate your SharePoint calls

24 Continuous Integration How do you setup a build server? (Build requires SharePoint installed) How do you dynamically create SharePoint Solutions Packages

25 What if I want more? Go to http://www.codeplex.com/spghttp://www.codeplex.com/spg

26 ROBERT L. BOGUE ROB.BOGUE@THORPROJECTS.COM Thank You


Download ppt "Microsoft Patterns and Practices SharePoint Guidance Robert L. Bogue MS MVP, MCSE, MCSA: Security"

Similar presentations


Ads by Google