microsoft patterns and practices sharepoint guidance l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Microsoft Patterns and Practices SharePoint Guidance PowerPoint Presentation
Download Presentation
Microsoft Patterns and Practices SharePoint Guidance

Loading in 2 Seconds...

play fullscreen
1 / 26

Microsoft Patterns and Practices SharePoint Guidance - PowerPoint PPT Presentation


  • 102 Views
  • Uploaded on

Microsoft Patterns and Practices SharePoint Guidance. Robert L. Bogue MS MVP, MCSE, MCSA: Security Rob.Bogue@ThorProjects.com. Where are we today?. Where are we today (for real)?. There are relatively few SharePoint Developers today

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Microsoft Patterns and Practices SharePoint Guidance' - lyndon


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
microsoft patterns and practices sharepoint guidance

Microsoft Patterns and PracticesSharePoint Guidance

Robert L. BogueMS MVP, MCSE, MCSA: Security

Rob.Bogue@ThorProjects.com

where are we today for real
Where are we today (for real)?
  • There are relatively few SharePoint Developers today
  • We have free training that MS provides at http://mssharepointdeveloper.com
    • Hands on labs
    • Presentations
    • Demos (code)
  • … but we don’t have best practices
the scenario training management
The Scenario – Training Management
  • Corporate Training is a big deal.
    • It needs tracked for personnel reasons
    • Budgeted for accounting reasons
how do we deploy solutions
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

when should i create a site definition
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 SharePoint

how should i make a site definition
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 Development

how do i make changes to a site definition
How do I make changes to a Site Definition?

Design additional Features

Feature staple the feature to the site definition

what is stapling
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.

when to use site templates
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

lists definition vs content types
Lists Definition vs. Content Types
  • List Definition
    • Specify fields
    • Specify forms
    • Specify views
  • Content Types
    • Specify fields
    • Specify forms
what do we do about branding
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
where do you store configuration
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.)
creating content types
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

modifying content types
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

splist vs database table
SPList vs. Database Table
  • SPList
    • User controllable fields
    • User controllable views
    • Export to Excel
    • Alerts
  • Database
    • High performance
    • Large scalability
custom aspx pages
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

render contents vs createchildcontrols
RenderContents vs. CreateChildControls
  • Render/RenderContents = BAD
    • ASP approach
    • No events
    • No multi-device support
  • CreateChildControls
    • ASP.NET Approach
    • PostBack, ViewState, etc.
    • Multi-device support
how do i manage dev test prod
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 SharePoint

updating assemblies
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)
unit testing
Unit Testing

It’s hard

Objects are sealed and have internal constructors

TypeMock can be used…

You can isolate your SharePoint calls

continuous integration
Continuous Integration

How do you setup a build server? (Build requires SharePoint installed)

How do you dynamically create SharePoint Solutions Packages

what if i want more
What if I want more?

Go to http://www.codeplex.com/spg