Microsoft Office System UK Developers Conference Radisson Edwardian, Heathrow 29 th & 30 th June 2005
Site Definition Design And Deployment Building Complete Site Solutions Site Definition Design And Deployment Michael O’Donovan Consultant Microsoft UK
Agenda Site Definition Overview Files, Pages and Navigation Lists, Views and Forms Advanced Techniques Deployment
SharePoint As Platform Web Applications Platform Browser Based User Interfaces for Creation Componentized Rendering and UI Plank ASP.NET Web Parts Data Plank Dynamic Lists Provisioning Plank Sites and Webs Site Definition as Web Application Manifest
Site Definitions What is a Site Template? Export WSS site to a CAB file (.stp) Create a new site based on this What is a Site Definition? Collection of Xml manifests Aspx pages Web part definitions
The Ingredients Of SharePoint List Definitions List Templates Document Templates Base Types Navigation Structure Configurations File Sets [Modules] Pages Lists and Schema Documents Data File Set Refs List Instance Refs
Files, Pages, And Navigation
xml\onet.xml lists\ \schema.x ml default.aspx lists\ \ dispform.aspx lists\ \ editform.aspx lists\ \ newform.aspx
File Sets [Modules] Declare sets of files Files can have View Web Parts Others Web Parts Can be root web only Can declare site-collection wide resources Web Parts! File Sets [Modules]
SharePoint Pages Three Types _layouts pages and files “Ghosted” provisionable content pages “Unghosted” provisionable content pages
Content Pages Assembly Registration Meta Tags owsbrows.js ows.css Theme Control ASP.NET Static HTML owsmac.css [if Mac] VML Declarations HEAD BODY Navigation Control Portal Control Quick Launch Controls Includes: SharePoint.WebpartPages SharePoint.Utilities SharePoint.Controls Emits link to theme CSS file Simple browser logic One for each Quick Launch Section Renders link to Portal site WebPartZone Controls ows.js EMBEDDE D BY WSS menu.htc
Navigation Nodes What do navigation nodes do for you? Editable in FrontPage Customize Quick Launch Area New links for new lists Navigation Structure
Basic Pages
Lists
xml\onet.xml lists\ \schema.x ml default.aspx lists\ \ dispform.aspx lists\ \ editform.aspx lists\ \ newform.aspx
List Definitions Defines the fields for a list Edit, Display, and New Forms Views List Definitions
List Views A view is A Web part page A ListView WebPart Field List Caml Query ToolBar definitions List Definitions
Default List Data “Welcome to SharePoint!” Only one list data set per list definition List equivalent of Modules List Definitions
List Templates Points at a list definition Contains usage metadata Almost always a 1:1 relationship between templates and definitions TIP: Reuse our list definitions by pointing your list templates at our schemas List Templates
Five Places To Add Lists schema.xml: Place your schema, fields, and values here Pages: allitems.aspx/*form.aspx in onet.xml registers your list for the create page tag in onet.xml
Interesting Settings For Lists Unique ( in onet.xml) Determines if list is deletable, also, hidden Hidden/HiddenList ( onet.xml) Determines if the list is hidden from the create page/list of lists RootWebOnly ( in onet.xml) Determines if the list should be provisioned in the root web of a site only
Lists, Views, And Forms
xml\onet.xml lists\ \schema.x ml default.aspx lists\ \ dispform.aspx lists\ \ editform.aspx lists\ \ newform.aspx
Document Templates File choices to provision a document library with Word Documents Excel Spreadsheets Web Part Pages Document Templates
Configurations Putting It Together Configurations
xml\onet.xml lists\ \schema.x ml default.aspx lists\ \ dispform.aspx lists\ \ editform.aspx lists\ \ newform.aspx
List Instances References Points at a list template Id Data comes from schema.xml Defines whether data should be provisioned in root only (RootWebOnly) List Instance Refs
Advanced Techniques
Advanced Techniques ExecuteUrl Navigate to a page after provisioning Let admins configure additional options after site provisioning
Advanced Techniques CustomJSUrl Embed a custom client side script across your site Access and use the “client OM” of SharePoint
Advanced Techniques Alternate Header Replaces header in application pages embedded in page
Advanced Techniques Alternate CSS Add a link to a CSS file on application pages
Advanced Techniques
SharePoint Design Patterns
The Modified Team Site A team site suited to your line of business Custom branding New theme/alternate header New lists New document templates
Web Application Most SharePoint application pages hidden/not linked One or more lists as datastore Leverage security, eventing infrastructure
The Document Workflow Site A site centered around one or more document libraries Events for workflow implementations Main page contains status parts, instructions, links Many custom views for organizing document libraries
Deployment
Deploying Site Definitions Windows Installer Put relevant assemblies in GAC Eliminates per-virtual server deployment Your solution must be fully trusted
WiX Windows Installer Xml Open Source Tool from Microsoft Wix lets you define MSI structure in XML MSIs are databases XML schema maps to database structure
Deployment With WiX
From The Field NAnt for deployment NUnit for test Developer Project Kick Start Workspace GotDotNet.com
Using NAnt and NUnit
Summary Site Definition Overview Files, Pages and Navigation Lists, Views and Forms Advanced Techniques Deployment
Discussion
© 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.