200 likes | 348 Views
Templates and Features: The Engine Under the SharePoint Hood Build and Deploy Your Own. Ed Hild Architect Microsoft Technology Center. Session Objectives And Agenda. Provide strategies for developing templates, definitions, and features. Best practices for deploying code to a SharePoint farm.
E N D
Templates and Features: The Engine Under the SharePoint HoodBuild and Deploy Your Own Ed Hild Architect Microsoft Technology Center
Session Objectives And Agenda Provide strategies for developing templates, definitions, and features Best practices for deploying code to a SharePoint farm Understand the relationships between definitions, templates, features, and solutions Introduction to development tools such as Windows SharePoint Services Extensions for Visual Studio .NET, ECM Starter Kit, and SharePoint Solution Generator
The Scenario • A Vice President of Litware has been given a demo by the IT department • Impressed with the use of Microsoft Office SharePoint Server for managing job openings • Open positions • Candidates resumes • Interview process • The VP Challenge Can this best practice be made available to all departments?
Taking Inventory • Litware has a line-of-business (LOB) application for job openings • IT department has been using • Team site with list of openings and assigned leads • List of contacts for candidates with resumes • Interview sites with survey, questions, and best practices • The HR department has standard document templates for • Offer letters • Thank-you letters • etc.
Our Answer Department Site • A turn-key solution that each department can decide to enable on their site • Automatically creates appropriate customizations • List of job openings • Workflow to create workspaces for filling that job • Site collections for each job where the team • Reviews candidates • Conducts interviews • Provides feedback List of Job Openings Job Opening Site Collection http://intranet/jobs/4321 • Job Details • Candidates • Doc Templates • Interview Guidelines • Calendar • Survey • Best Practices • Interview Guidelines • Calendar • Survey • Best Practices
Planned Design The Job Openings Feature List Instances Workflow Association Workflow Openings List Definition
Why a Feature? • Packaged sets of customizations • Can be scoped • Farm • Web Application • Site Collection • Web • Supports dependencies • Hidden and Visible
Constructing the Feature • Build a Job Openings list that includes LOB integration • Capture it as a list definition (SharePoint Solution Generator included in Visual Studio Extensions for WSS) • Build the workflow(ECM Starter Kit included in MOSS SDK) • Wrap them together with the creation of: • Instance of the job openings list • The task and workflow history list instances • Automatic workflow association
demo Building the Job Openings Feature Ed Hild MTC Technology Architect Microsoft
Design Continued • Top-level site contains • Business Data Item Web Part to show the details of the job • Filter Web Part that retrieves JobID from the property bag • Contacts list for candidates • Site template for interviews • Interview site contains • Survey for feedback • Best practices docs • Calendar
Constructing the Site Definition • Start with an empty site • Add Web Parts and create contacts list • Capture as a site definition (Solution Generator) • Build custom Web Part to expose site’s property bag • Visual Studio extensions for Windows SharePoint Services • Implement Filter interfaces • Insert into the onet.xml file • Save interview site as a site template and add to the gallery
demo Building the Job Opening Site Definition Ed Hild MTC Technology Architect Microsoft
Design Continued • HR has documents for the interview process • All contain candidate contact data • Provide template for content types • Add a custom action feature to allow the insert of a contact items into the document
Constructing HR Docs Feature • Add a custom XML part to documents • Bind Word content controls • Incorporate them as content types • Use a feature • Add custom action to contact list items • Add custom application page to insert data • Add this feature to the Job Opening Site definition
demo Integrating the HR Documents Ed Hild MTC Technology Architect Microsoft
Enhancing Built-in Site Definitions • Goal: Add custom functionality to “Out of the Box” site definitions • Features work fine but require activation • A custom site definition may be overkill • Answer: Feature Stapling(a.k.a. “Feature Site Template Associations”) • Farm-scoped feature attaches Web-scoped feature(s) to specific site definitions • Features automatically activate when a site is created • Site definition can be changed independently of stapled features
Solution Deployment • Developer packages their customizations into a solution • Admin deploys to Web front-end servers • Stored in Config Database • Solutions can contain: • Feature definitions • Site definitions • Template pages and resources • Resources • Global, bin assemblies • Code access security policies
Related Content Pro SharePoint Solution DevelopmentCombining .NET, SharePoint, and Office 2007 Topics included: • Microsoft Office SharePoint Server • Visual Studio Tools for Office • Microsoft Office 2007 system http://blogs.msdn.com/edhild