Top Banner
1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist [email protected]
47

1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist [email protected] John Hodgson Product.

Dec 27, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

1

Microsoft AustraliaApplication Platform Special Interest Group

John HodgsonProduct Technology [email protected]

Page 2: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

2

AgendaAgenda

Development OptionsDevelopment EnvironmentWeb Part Deployment MethodsDebugging OptionsDistribution And ManagementDocument and Lists accessSite and List DefinitionsFuture Of Web Parts (i.e., “Whidbey”)Additional Resources

Development OptionsDevelopment EnvironmentWeb Part Deployment MethodsDebugging OptionsDistribution And ManagementDocument and Lists accessSite and List DefinitionsFuture Of Web Parts (i.e., “Whidbey”)Additional Resources

Page 3: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

3

Programs

ServersServices

Page 4: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

4

SharePoint InvestmentsSharePoint InvestmentsEnterprise Portal Enterprise Portal SolutionSolution built on top built on top of Windows of Windows SharePoint ServicesSharePoint Services

Hub and AggregatorHub and Aggregator for SharePoint for SharePoint personal, team and personal, team and portal sitesportal sites

SharePoint Portal ServerSharePoint Portal Server News and LinksNews and Links Site Directory and Site Directory and

ConnectionsConnections Personal SitesPersonal Sites Audience TargetingAudience Targeting Index, Search and AlertsIndex, Search and Alerts Single Sign-OnSingle Sign-On BizTalk IntegrationBizTalk Integration

Team Collaboration Team Collaboration SolutionSolution well beyond well beyond file serversfile servers

Scalable Scalable Workspace Workspace PlatformPlatform

SharePoint ServicesSharePoint Services Document Storage Document Storage

and Collaborationand Collaboration Flexible ListsFlexible Lists Web Part PagesWeb Part Pages Page PersonalizationPage Personalization Site Life Cycle Site Life Cycle

ManagementManagement Scale-Up/Out Scale-Up/Out

FoundationFoundation

Page 5: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

5

SharePoint Out of The Box

Page 6: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

6

Development OptionsDevelopment Options

Web Parts

ASP.NET

Document Library Events

Templates

Web Parts

ASP.NET

Document Library Events

Templates

Page 7: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

8

Development EnvironmentsDevelopment Environments

One machine methodYour “workstation” is Windows Server 2003http://www.msfn.org/win2k3/

Two (or more) machine methodDevelop on Windows XPDeploy to Windows Server 2003

On local Virtual PC or VMWare imageOn remote development server

One machine methodYour “workstation” is Windows Server 2003http://www.msfn.org/win2k3/

Two (or more) machine methodDevelop on Windows XPDeploy to Windows Server 2003

On local Virtual PC or VMWare imageOn remote development server

Page 8: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

10

Development Workstation RequirementsDevelopment Workstation Requirements

Visual Studio .NET2002 or 2003

Ignore its warning about FrontPage Server Extensions

Web Part Project Template for Visual Studio .NET

http://msdn.microsoft.com/sharepoint

Copy object model DLLs from ServerC:\Program Files\Common Files\Microsoft Shared\web server extensions\60\ISAPI

Microsoft.SharePoint.DLLMicrosoft.SharePoint.Portal.DLLMicrosoft.SharePoint.Portal.SingleSignon.DLLMicrosoft.SharePoint.Portal.SingleSignon.Security.DLL

Visual Studio .NET2002 or 2003

Ignore its warning about FrontPage Server Extensions

Web Part Project Template for Visual Studio .NET

http://msdn.microsoft.com/sharepoint

Copy object model DLLs from ServerC:\Program Files\Common Files\Microsoft Shared\web server extensions\60\ISAPI

Microsoft.SharePoint.DLLMicrosoft.SharePoint.Portal.DLLMicrosoft.SharePoint.Portal.SingleSignon.DLLMicrosoft.SharePoint.Portal.SingleSignon.Security.DLL

Page 9: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

16

Debugging Web PartsDebugging Web Parts

MethodsDirect

Attach to instance of W3WP.EXE

“Automatic”Denote URL of a given Web Part Page as application start page

You’re really debugging the page, not the Web Part assembly

One server per developer is the idealNot polite to pause shared Web serverIf multiple instances, not easy to identify which instance of W3WP.EXE is “yours”

Web.config has useful settings

MethodsDirect

Attach to instance of W3WP.EXE

“Automatic”Denote URL of a given Web Part Page as application start page

You’re really debugging the page, not the Web Part assembly

One server per developer is the idealNot polite to pause shared Web serverIf multiple instances, not easy to identify which instance of W3WP.EXE is “yours”

Web.config has useful settings

Page 10: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

17

Debugging Web Parts (cont.)Debugging Web Parts (cont.)

Deploying to the GAC makes debugging a little harder

Must be able to reach PDB file

Options:Deploy to the bin directory while debuggingUse manual installationUse gacutil -i on the PDB afterstsadm …… -globalinstall

Default.aspx?contents=1

Deploying to the GAC makes debugging a little harder

Must be able to reach PDB file

Options:Deploy to the bin directory while debuggingUse manual installationUse gacutil -i on the PDB afterstsadm …… -globalinstall

Default.aspx?contents=1

Page 11: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

19

Web.Config SettingsWeb.Config Settings

Turn on debugging<SharePoint> <SafeMode CallStack=“true" /><system.web> <customErrors mode="Off" />

Change site’s Trust Level for the site<system.web> <trust level="WSS_Minimal" originUrl= ""/>

Also “WSS_Medium” or “Full”

Turn on debugging<SharePoint> <SafeMode CallStack=“true" /><system.web> <customErrors mode="Off" />

Change site’s Trust Level for the site<system.web> <trust level="WSS_Minimal" originUrl= ""/>

Also “WSS_Medium” or “Full”

Page 12: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

20

Web.Config Settings (cont.)Web.Config Settings (cont.)

Other Web Part settings under <SharePoint><SafeMode MaxControls="50" CallStack="false" /><WebPartLimits MaxZoneParts="50" PropertySize="1048576" /><WebPartCache Storage="CacheObject" />

also “Database” or “None”

<WebPartWorkItem Timeout="7000" /><WebPartControls DatasheetControlGuid="65BCBEE4-7728-41a0-97BE-14E1CAE36AAE" />

Substitute your own Datasheet control instead of the Office 2003 default

<OnlineLibrary Url="http://r.office.microsoft.com/r/hlidAwsGallery" />

Also configurable in SharePoint Central Administration

Other Web Part settings under <SharePoint><SafeMode MaxControls="50" CallStack="false" /><WebPartLimits MaxZoneParts="50" PropertySize="1048576" /><WebPartCache Storage="CacheObject" />

also “Database” or “None”

<WebPartWorkItem Timeout="7000" /><WebPartControls DatasheetControlGuid="65BCBEE4-7728-41a0-97BE-14E1CAE36AAE" />

Substitute your own Datasheet control instead of the Office 2003 default

<OnlineLibrary Url="http://r.office.microsoft.com/r/hlidAwsGallery" />

Also configurable in SharePoint Central Administration

Page 13: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

21

Distributing Web PartsDistributing Web Parts

CAB filesTwo-step process with STSADM

Stsadm –o addwppack –filename filenameStsadm –o addwppack –name filename

Use WPMove Web serviceDownload from GotDotNet

MSI filesInstall directly on each server

CAB filesTwo-step process with STSADM

Stsadm –o addwppack –filename filenameStsadm –o addwppack –name filename

Use WPMove Web serviceDownload from GotDotNet

MSI filesInstall directly on each server

Page 14: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

22

Distributing Web Parts Distributing Web Parts

Site definitions/templatesCan include custom Web Part pagesDWP info embedded as XML data islandsConverted to DB entries after page is processed

Site definitions can also includeCustom lists and librariesCustom ASPX pagesEvent handlersDesign elements and resources

Site definitions/templatesCan include custom Web Part pagesDWP info embedded as XML data islandsConverted to DB entries after page is processed

Site definitions can also includeCustom lists and librariesCustom ASPX pagesEvent handlersDesign elements and resources

Page 15: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

23

Connecting Parts TogetherConnecting Parts Together

Parts sharing data through eventsImagine audio signalsConsumer and provider of data

Client and server interfacesIListIRowICellIFilterIParamsTransformers

Parts sharing data through eventsImagine audio signalsConsumer and provider of data

Client and server interfacesIListIRowICellIFilterIParamsTransformers

Page 16: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

24

Developing Web Parts

Page 17: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

25

Accessing List DataObject ModelAccessing List DataObject Model

Available objects under Microsoft.SharePoint namespace:

SPList – Basic list object for getting to list dataSPListCollection – Collection of list objectsSPListItem – Item/Row in a listSPListItemCollection – Collection of list itemsSPView – View of a SharePoint listSPField – Field/Column in a listSPListTemplate – Template of a list

Available objects under Microsoft.SharePoint namespace:

SPList – Basic list object for getting to list dataSPListCollection – Collection of list objectsSPListItem – Item/Row in a listSPListItemCollection – Collection of list itemsSPView – View of a SharePoint listSPField – Field/Column in a listSPListTemplate – Template of a list

Page 18: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

26

Accessing List DataWeb ServicesAccessing List DataWeb Services

Remotely view and edit SharePoint List data

http://[server]/_vti_bin/Lists.asmx

Operations available

Remotely view and edit SharePoint List data

http://[server]/_vti_bin/Lists.asmx

Operations available

AddAttachmentUpdateListDeleteListUpdateListItemsGetAttachmentCollectionAddList

GetListItemChangesGetListAndViewGetListGetListCollectionGetListItemsDeleteAttachment

Page 19: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

27

ASP.Net Apps

Page 20: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

28

Accessing Document LibrariesObject ModelAccessing Document LibrariesObject Model

Available objects under Microsoft.SharePoint namespace:

SPFile – File objectSPFileCollection – Collection of files SPFileVersion – Version of a fileSPFolder – Folder objectSPDocumentLibrary – Document Library objectSPDocDiscussion – Discussions on a fileSPDocTemplate – Used when creating a new file

Available objects under Microsoft.SharePoint namespace:

SPFile – File objectSPFileCollection – Collection of files SPFileVersion – Version of a fileSPFolder – Folder objectSPDocumentLibrary – Document Library objectSPDocDiscussion – Discussions on a fileSPDocTemplate – Used when creating a new file

Page 21: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

29

Accessing Document LibrariesAccessing Document Libraries

Remote Access

Set Meta-data

Batch File Upload File/IO Version

ControlCheck-In/ Check-Out

Object Model Web Services

WebDAV FrontPage RPC

Page 22: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

30

Extending Document LibrariesEvent HandlersExtending Document LibrariesEvent Handlers

Useful for implementing workflowUsed by TeamPlate, SourceCode, Nintex

Useful for triggering business logicLogging, notification, etc…

BizTalk Server 2004 Adapter now available

Types of eventsCheckIn, CheckOut, UncheckOut

Copy, Move, Delete, Insert, Update

Events are asynchronousCan not prevent deletions

Can not get document data

Useful for implementing workflowUsed by TeamPlate, SourceCode, Nintex

Useful for triggering business logicLogging, notification, etc…

BizTalk Server 2004 Adapter now available

Types of eventsCheckIn, CheckOut, UncheckOut

Copy, Move, Delete, Insert, Update

Events are asynchronousCan not prevent deletions

Can not get document data

Page 23: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

31

Document Library Events

Page 24: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

32

Site / List TemplatesSite / List Templates

What is a Site Definition?

What is a Custom Template?

What is a List Definition?

What is a Custom List Template?

What is a Site Definition?

What is a Custom Template?

What is a List Definition?

What is a Custom List Template?

Page 25: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

33

Why Create Site Definitions?Why Create Site Definitions?

Don’t take our word for it – look at:Visual Studio Team SystemBizTalk Server 2004 Business Activity MonitorMicrosoft Business Systems Business Portal for Great PlainsProject Server 2003SharePoint Portal Server 2003Class Server (v.next)

Don’t take our word for it – look at:Visual Studio Team SystemBizTalk Server 2004 Business Activity MonitorMicrosoft Business Systems Business Portal for Great PlainsProject Server 2003SharePoint Portal Server 2003Class Server (v.next)

Page 26: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

35

Site Definition FilesSite Definition FilesEverything is underneath:

C:\Program Files\Common Files\Microsoft Shared\web server

extensions\60\template

File ScopesServer Language

E.g., \1033

Site Definition E.g., \1033\STS

List DefinitionE.g., \1033\STS\LISTS\DOCLIB

Everything is underneath:C:\Program Files

\Common Files\Microsoft Shared\web server

extensions\60\template

File ScopesServer Language

E.g., \1033

Site Definition E.g., \1033\STS

List DefinitionE.g., \1033\STS\LISTS\DOCLIB

Enumeration of site definitions

Site definition

List definition

Minimalistsite definition

Page 27: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

42

SCHEMA.XML FieldsSCHEMA.XML Fields<Field Type="Choice" BaseType="Text" Name="Area"> <CHOICES> <CHOICE>Views</CHOICE> <CHOICE>Site Design</CHOICE> <CHOICE>Layouts</CHOICE> <CHOICE>Schema Design</CHOICE> <CHOICE>Fields</CHOICE> <CHOICE>Forms</CHOICE> <CHOICE>Projects</CHOICE> <CHOICE>Inter-Team Issues</CHOICE> <CHOICE>Schedule</CHOICE> <CHOICE>Spec</CHOICE> <CHOICE>Headcount</CHOICE> <CHOICE>Misc</CHOICE> </CHOICES></Field>

<Field Type="Choice" BaseType="Text" Name="Area"> <CHOICES> <CHOICE>Views</CHOICE> <CHOICE>Site Design</CHOICE> <CHOICE>Layouts</CHOICE> <CHOICE>Schema Design</CHOICE> <CHOICE>Fields</CHOICE> <CHOICE>Forms</CHOICE> <CHOICE>Projects</CHOICE> <CHOICE>Inter-Team Issues</CHOICE> <CHOICE>Schedule</CHOICE> <CHOICE>Spec</CHOICE> <CHOICE>Headcount</CHOICE> <CHOICE>Misc</CHOICE> </CHOICES></Field>

Page 28: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

43

SCHEMA.XML ViewsSCHEMA.XML Views

<View BaseViewID="1" Type="HTML" WebPartZoneID="Main"

DisplayName="BLog HTML Preview" DefaultView="FALSE" Url="Forms/BLogAsHTML.aspx"> <GroupByHeader/> <GroupByFooter/> <ViewHeader/> <ViewBody/> <ViewFooter/> <PagedRowset/> <PagedRecurrenceRowset/> <RowLimit Paged="FALSE">1</RowLimit> <ViewEmpty/> <ViewBidiHeader/> <Toolbar Type="Standard" /> <ViewFields /> <Query /></View>

<View BaseViewID="1" Type="HTML" WebPartZoneID="Main"

DisplayName="BLog HTML Preview" DefaultView="FALSE" Url="Forms/BLogAsHTML.aspx"> <GroupByHeader/> <GroupByFooter/> <ViewHeader/> <ViewBody/> <ViewFooter/> <PagedRowset/> <PagedRecurrenceRowset/> <RowLimit Paged="FALSE">1</RowLimit> <ViewEmpty/> <ViewBidiHeader/> <Toolbar Type="Standard" /> <ViewFields /> <Query /></View>

Page 29: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

44

SCHEMA.XML ToolbarsSCHEMA.XML Toolbars

<Toolbar Position="After" Type="Freeform"> <HTML><![CDATA[ <table> .. more

HTML..]]></HTML>

. . <URL Cmd="New" />

. . <HTML><![CDATA[ HREF="JavaScript:void

window.open(']]></HTML>

. . <HttpVDir/>

. . <HTML><![CDATA[');]]></HTML></Toolbar>

<Toolbar Position="After" Type="Freeform"> <HTML><![CDATA[ <table> .. more

HTML..]]></HTML>

. . <URL Cmd="New" />

. . <HTML><![CDATA[ HREF="JavaScript:void

window.open(']]></HTML>

. . <HttpVDir/>

. . <HTML><![CDATA[');]]></HTML></Toolbar>

Page 30: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

45

SCHEMA.XML FormsSCHEMA.XML Forms

<Form Type="DisplayForm" Url="DispForm.aspx" WebPartZoneID="Main"><ListFormOpening/><ListFormButtons/>

<ListFormBody/></Form>

<Form Type="DisplayForm" Url="DispForm.aspx" WebPartZoneID="Main"><ListFormOpening/><ListFormButtons/>

<ListFormBody/></Form>

Page 31: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

46

Site Definition Walk-Through

Page 32: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

47

How To Quickly Create Your Own Site DefinitionHow To Quickly Create Your Own Site Definition

1.Copy the ‘sts’ directory and rename it ‘stsfoo’2.Copy WEBTEMP.XML to WEBTEMPFOO.XML3.Remove all but one Configuration from

WEBTEMPFOO.XML4.Give your Configuration an interesting title5.Ensure that ‘Template Name’ points to ‘stsfoo’6.Give ‘Template ID’ a number greater than 10,0007.Run IISRESET8.Create a new Site

1.Copy the ‘sts’ directory and rename it ‘stsfoo’2.Copy WEBTEMP.XML to WEBTEMPFOO.XML3.Remove all but one Configuration from

WEBTEMPFOO.XML4.Give your Configuration an interesting title5.Ensure that ‘Template Name’ points to ‘stsfoo’6.Give ‘Template ID’ a number greater than 10,0007.Run IISRESET8.Create a new Site

Page 33: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

48

Advanced Site Definition FeaturesAdvanced Site Definition Features

Specify a page to go to immediately after site creationExecuteUrl Url="config.aspx"

Replace top navigation in site pagesAlternateHeader="PortalHeader.aspx“

Alter JScript functions (e.g. customize edit menu dropdown)CustomJSUrl=“owscustom.js”

Add/Edit CSS attributes AlternateCSS=“owscustom.css”

Customize the File Open/Save dialog in OfficeFileDialogPostProcessor ID=[GUID]

Disable features on your site (Backup, Subsite Creation, etc...)DisableWebDesignFeatures="wdfbackup; wdfNewSubSite“

Provide a custom security provider to SharePoint Portal Server searchExternalSecurityProvider ID=[GUID] Type=“...”

Specify a page to go to immediately after site creationExecuteUrl Url="config.aspx"

Replace top navigation in site pagesAlternateHeader="PortalHeader.aspx“

Alter JScript functions (e.g. customize edit menu dropdown)CustomJSUrl=“owscustom.js”

Add/Edit CSS attributes AlternateCSS=“owscustom.css”

Customize the File Open/Save dialog in OfficeFileDialogPostProcessor ID=[GUID]

Disable features on your site (Backup, Subsite Creation, etc...)DisableWebDesignFeatures="wdfbackup; wdfNewSubSite“

Provide a custom security provider to SharePoint Portal Server searchExternalSecurityProvider ID=[GUID] Type=“...”

Page 34: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

49

Editing Deployed Site DefinitionsEditing Deployed Site Definitions

ONLY modify deployed site definitions if you absolutely have to. If possible:

Build new versions of site definitionsOperate new version in parallel with old versions

Ensure that new sites use the new versions.Mark old site definitions as hidden but left intact

Data can be moved from old sites to new sites

Old sites can be updated in a controlled fashion with the object model

ONLY modify deployed site definitions if you absolutely have to. If possible:

Build new versions of site definitionsOperate new version in parallel with old versions

Ensure that new sites use the new versions.Mark old site definitions as hidden but left intact

Data can be moved from old sites to new sites

Old sites can be updated in a controlled fashion with the object model

Page 35: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

50

Editing Deployed Site Definitions (cont.)

Editing Deployed Site Definitions (cont.)

Guidelines for modifying a site definition already in useAdding features is less dangerous than changing or deleting them

Changing often results in loss of data

Deleting often results in broken views

Add to the end of the <Fields> section to avoid shuffling your data

If you rely on ghosting to push your changes to all sites, beware of customized pages stored in the database

The ‘vti_hasdefaultcontent’ field available from SPFile.Properties can be used to determine whether or not a file is ghosted

If your changes affect create-time sections of the site definition, use the object model to simulate these actions on existing sites

Guidelines for modifying a site definition already in useAdding features is less dangerous than changing or deleting them

Changing often results in loss of data

Deleting often results in broken views

Add to the end of the <Fields> section to avoid shuffling your data

If you rely on ghosting to push your changes to all sites, beware of customized pages stored in the database

The ‘vti_hasdefaultcontent’ field available from SPFile.Properties can be used to determine whether or not a file is ghosted

If your changes affect create-time sections of the site definition, use the object model to simulate these actions on existing sites

Page 36: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

51

Tips And TricksTips And TricksCreate a new site definition – don’t modify a shipped site definitionStart from a copy of a similar site definitionMarking configurations as ‘Hidden’ in WEBTEMP.XML is a good way to create site definitions for use by custom applications (or retire outdated ones)The ‘ExportList’ method documented in the ‘URL Protocol’ section of the SDK is a convenient way to generate CAMLCustomizations to meeting workspaces need to retain a template ID of ‘2’SharePoint ‘applications’ often combine Web Parts, Event Handlers, Web Services, and Site DefinitionsUse the DisableWebDesignFeatures attribute of the Project element in ONET.XML to block FrontPage

Create a new site definition – don’t modify a shipped site definitionStart from a copy of a similar site definitionMarking configurations as ‘Hidden’ in WEBTEMP.XML is a good way to create site definitions for use by custom applications (or retire outdated ones)The ‘ExportList’ method documented in the ‘URL Protocol’ section of the SDK is a convenient way to generate CAMLCustomizations to meeting workspaces need to retain a template ID of ‘2’SharePoint ‘applications’ often combine Web Parts, Event Handlers, Web Services, and Site DefinitionsUse the DisableWebDesignFeatures attribute of the Project element in ONET.XML to block FrontPage

Page 37: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

52

FrontPage 2003

Page 38: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

53

Understanding “Ghosting”Understanding “Ghosting”Pages and list schema are read from the site definition files and cached at IIS process startup

Page source is on the disk, not in the DBPulled from the cache at runtimeIt still appears to be present in the site, hence the term “ghosted”

Pages are only written to the database when customized within a site

Browser-based customization (i.e. adding/removing web parts) does not change the actual ASPX pages, hence doesn’t unghostFrontPage customization often changes ASPX pages

Maximizes scalabilityReuse un-customized pages across sitesReduce unnecessary data storage and retrieval

Pages and list schema are read from the site definition files and cached at IIS process startup

Page source is on the disk, not in the DBPulled from the cache at runtimeIt still appears to be present in the site, hence the term “ghosted”

Pages are only written to the database when customized within a site

Browser-based customization (i.e. adding/removing web parts) does not change the actual ASPX pages, hence doesn’t unghostFrontPage customization often changes ASPX pages

Maximizes scalabilityReuse un-customized pages across sitesReduce unnecessary data storage and retrieval

Page 39: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

54

Windows SharePoint Services And ASP.NET “Whidbey”Windows SharePoint Services And ASP.NET “Whidbey”

Current version of Windows SharePoint Services will work on ASP.NET “Whidbey”

Windows SharePoint Services, after Service Pack 2, will run as-is on Whidbey runtimeASP.NET team will provide a Windows SharePoint Services Web Part that can encapsulate a “Whidbey” Web Part

Next version of Windows SharePoint Services will build on top of ASP.NET “Whidbey”

Backward-compatible object model will permit continued use of current Web Parts

Current version of Windows SharePoint Services will work on ASP.NET “Whidbey”

Windows SharePoint Services, after Service Pack 2, will run as-is on Whidbey runtimeASP.NET team will provide a Windows SharePoint Services Web Part that can encapsulate a “Whidbey” Web Part

Next version of Windows SharePoint Services will build on top of ASP.NET “Whidbey”

Backward-compatible object model will permit continued use of current Web Parts

Page 40: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

55

ASP.NET “Whidbey” Web PartsASP.NET “Whidbey” Web Parts

Web Part concept integrated directly into ASP.NET Can be used in any type of Web site

Windows or form authentication

Provider model for persistence/personalization

Fully integrated into ASP.NET control modelAny ASP.NET server-side control can be a Web Part

User Controls can also be Web Parts

Connections are significantly enhancedOne attribute (c.f., overriding multiple methods)

Rich data types (c.f., list, row, cell, parameters)

Zones become objects, not just containersGreat Visual Studio designer experience

Web Part concept integrated directly into ASP.NET Can be used in any type of Web site

Windows or form authentication

Provider model for persistence/personalization

Fully integrated into ASP.NET control modelAny ASP.NET server-side control can be a Web Part

User Controls can also be Web Parts

Connections are significantly enhancedOne attribute (c.f., overriding multiple methods)

Rich data types (c.f., list, row, cell, parameters)

Zones become objects, not just containersGreat Visual Studio designer experience

Page 41: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

56

When To Build WhatWhen To Build What

Pre-Whidbey RTM deliverables should be built using current Windows SharePoint Services Web Part infrastructure

Such Web Parts will run in the next version of Windows SharePoint ServicesBy all means, experiment with Whidbey Web Parts during its beta period

When ASP.NET “Whidbey” ships, build new Web Parts using the new technology

Current Windows SharePoint Services sites will be able to use them once wrapper is ready

Pre-Whidbey RTM deliverables should be built using current Windows SharePoint Services Web Part infrastructure

Such Web Parts will run in the next version of Windows SharePoint ServicesBy all means, experiment with Whidbey Web Parts during its beta period

When ASP.NET “Whidbey” ships, build new Web Parts using the new technology

Current Windows SharePoint Services sites will be able to use them once wrapper is ready

Page 42: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

57

Web-Based ResourcesWeb-Based ResourcesDeveloper Informationhttp://msdn.microsoft.com/sharepoint http://gotdotnet.com/team/sharepoint

Product Informationhttp://microsoft.com/sharepoint

Web Component Directoryhttp:/microsoft.com/sharepoint/webparts

Developer Informationhttp://msdn.microsoft.com/sharepoint http://gotdotnet.com/team/sharepoint

Product Informationhttp://microsoft.com/sharepoint

Web Component Directoryhttp:/microsoft.com/sharepoint/webparts

Third-Party Sitesbarracuda.netgotsharepoint.comsharepointd2d.comsharepointexperts.comsharepointserver.comsharepointsolutions.comsharepointuniversity.comspsfaq.comwssdemo.comwssfaq.com

Third-Party Sitesbarracuda.netgotsharepoint.comsharepointd2d.comsharepointexperts.comsharepointserver.comsharepointsolutions.comsharepointuniversity.comspsfaq.comwssdemo.comwssfaq.com

Page 43: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

58

BooksBooksThe Rational Guide To: Building SharePoint Web Partsby Darrin Bishop (Mann – coming soon)

Microsoft SharePoint: Building Office 2003 Solutionsby Scot P. Hillier (APress)

The Rational Guide To: Building SharePoint Web Partsby Darrin Bishop (Mann – coming soon)

Microsoft SharePoint: Building Office 2003 Solutionsby Scot P. Hillier (APress)

Page 44: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

59

Building ASP.NET Server Controlsby Rob Cameron, Dale Michalk (APress)

Developing Microsoft ASP.NET Server Controls and Componentsby Nikhil Kothari, Vandana Datye (Microsoft Press)

Professional ASP.NET Server Controls: Building Custom Controls with C#by Matt Butler, Thiru Thangarathinam, Matt Milner, Michael Clark, Ryan O'Keefe, Angelo Kastroulis, Jan Narkiewicz, Daniel Cazzulino (Wrox)

Building ASP.NET Server Controlsby Rob Cameron, Dale Michalk (APress)

Developing Microsoft ASP.NET Server Controls and Componentsby Nikhil Kothari, Vandana Datye (Microsoft Press)

Professional ASP.NET Server Controls: Building Custom Controls with C#by Matt Butler, Thiru Thangarathinam, Matt Milner, Michael Clark, Ryan O'Keefe, Angelo Kastroulis, Jan Narkiewicz, Daniel Cazzulino (Wrox)

More BooksMore Books

Page 45: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

60

Give Documentation FeedbackGive Documentation Feedback

Windows SharePoint Services

[email protected]

Microsoft Office SharePoint Portal Server 2003

[email protected]

Windows SharePoint Services

[email protected]

Microsoft Office SharePoint Portal Server 2003

[email protected]

Page 46: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

61

Microsoft Events and Communities

Not getting event invites anymore? Don’t know what's on in your state?

Subscribe to TechNet Flash via TechNet Lounge

• http://www.microsoft.com/australia/technet

Visit MSDN Community Website and join MSDN Connections

• http://www.microsoft.com/australia/msdn

Subscribe to MSDN Flash Newsletter (events)

• http://msdn.microsoft.com/flash

Or…Visit the Profile Center and subscribe to all of them

https://profile.microsoft.com/RegSysSubscriptionCnt/SubCntDefault.aspx

Page 47: 1 Microsoft Australia Application Platform Special Interest Group John Hodgson Product Technology Specialist johnhodg@microsoft.com John Hodgson Product.

62© 2003-2004 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.