1 / 30

Best Practices for SharePoint Solution Deployment

DM400. Best Practices for SharePoint Solution Deployment. Ted Pattison Instructor Ted Pattison Group. SharePoint Training from People You Know and Trust http://www.TedPattison.net. Industry’s Leading Experts & SharePoint MVPs

lavina
Download Presentation

Best Practices for SharePoint Solution Deployment

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DM400 Best Practices for SharePoint Solution Deployment Ted Pattison Instructor Ted Pattison Group

  2. SharePoint Training from People You Know and Trusthttp://www.TedPattison.net Industry’s Leading Experts & SharePoint MVPs Andrew Connell - Shane Young - David Mann - John Holliday - Scot HillierNicola Young - Sahil Malik - Chris Predeek - Ted Pattison

  3. Agenda • Deployment in a Web Farm environment • The Root Files directory • Solution Packages • Demos of developing SharePoint Solutions • Features • Custom application pages • Custom page templates • Custom field types • Web Parts • Updates to web.config

  4. The WSS Farm • WSS deployment based on a farm • Farm requires Web server(s) and database server • Farm can be single server or multi-server • Each farm has exactly one configuration database

  5. SharePoint Customization Versus Development • Site Customizations • Changes to one particular site recorded in content DB • Done using the browser or the SharePoint Designer • Easy to do but hard to reuse • WSS Development • Creation of reusable templates/components • Templates/components installed on Web server • Development based on Visual Studio projects • Project source files checked into source code control • Projects can be moved through staging to production

  6. WSS Component Development • Feature-based Components • Custom Application Page • Site Page Templates • Master Pages • Web Parts • Site Columns and Content Types • Custom List and Document Library Definitions • List-based Event Handlers Custom Workflows • Components creating without using features • Custom Field Types • Site Definitions

  7. The Root Files directory • This is where many of your development files need to be deployed • Most files go into templates directory Web Service files GLOBAL .RESX files Admin Pages User Controls Features Images Application Pages Site Definitions Field*.xml files

  8. SharePoint Solution Packages • What is a Solution Package? • Templates and/or components in an installable unit • CAB file with .WSP extension • Package that contains metadata (manifest.xml) • Best Practice in SharePoint Solution Deployment • Use solution packages… period! • Add support for building/testing solution package early! MyStuff.wsp manifest.xml Other Stuff Templates/components

  9. What's inside manifest.xml?

  10. A sample manifest.xml file • Defines Solution properties and contents

  11. Building the .WSP file • Commonly done using MAKECAB.EXE • Requires .DDF input file Solution Package Build Process Input DDF File Output WSP File MAKECAB.EXE

  12. The DDF File Up Close • DDF file must build proper folder structure • Prefer .Set DestinationDir instruction MyStuff.wsp

  13. Two Phases of WSP Deployment .WSP Install ConfigDB (1) Solution Package Installation • .WSP file is copied to ConfigDB (2) Solution Package Deployment • .WSP pushed out to Web servers • Usually requires IIS Reset operation • Done in production farm in off hours WSP • REM - Install CustomApplicationPages.wsp in WSS Solution Package Store • %STSADM% -o addsolution -filename MyStuff.wsp • REM – force batch file to run timer job synchronously • %STSADM% -o execadmsvcjobs .WSP Deploy WFE ConfigDB WFE WSP WFE • REM - Deploy Solution Package MyStuff.wsp to Web servers in farm • %STSADM% -o deploysolution -name MyStuff.wsp -immediate • REM – force batch file to run timer job synchronously • %STSADM% -o execadmsvcjobs

  14. Solution Management in WSS • WSS Central Admin provides some control • Allows you to see and deploy .WSP files • Does not provide a way to install .WSP files

  15. Solution Package Properties • WSS Central Admin allows some inspection

  16. Helpful Development Tools • From Microsoft • Visual Studio 2005 Extensions for WSS • VSTO 3.0 in Visual Studio 2008 • From SharePoint Development Community • The WSPBuilder utility • The STSDEV utility

  17. The STSDEV Utility • Low-tech tool for creating solution packages • Think of it as an educational proof-of-concept • Helpful in getting started • Used to promote best practices • What does it do? • Generates Visual Studio files (.sln, csproj, .aspx, .cs) • Creates project with RootFiles directory structure • Eliminates need to edit manifest.xml file • Eliminates need to edit.ddf file • Takes care of GUIDs and assembly names • Provides custom tasks in .targets for common SharePoint development operations

  18. Walkthough of Using STSDEV • STSDEV based on Solution Providers

  19. Demo: CustomApplicationPages • Best Practices • Create solution-specific directory in LAYOUTS • Use code-behind with DLL installed in GAC • Adding a complimentary feature for navigation

  20. Demo: CustomSitePages • Best Practices • Use file-based templates for page creation • Add SafeControl setting when using custom controls • Deploy .ascx files into CONTROLTEMPLATES • Clean up during feature deactivation

  21. Demo: LitwareFieldTypes • Best Practices • Deploying custom field type using a .WSP • Avoiding naming conflicts with .ascx files

  22. Demo: Acme.WebParts • Best Practices • Adding SafeControl entries using manifest.xml • Deploy feature to push .webpart files into Web Part gallery

  23. Demo: Mega.WebParts • Best Practices • Deploying Web Part DLLs in bin directory • Adding CAS setting using manifest.xml

  24. Demo: LitwareAppSetting • Best Practices • Programmatically updating web.config • Providing control with WebApplication feature

  25. Sample Code from this session • http://www.TedPattison.net/downloads.aspx

  26. Summary • Deployment in a Web Farm environment • The Root Files directory • Solution Packages • Demos of developing SharePoint Solutions • Features • Custom application pages • Custom page templates • Custom field types • Web Parts • Updates to web.config

  27. Post Event DVD brought to you courtesy of:

  28. SUBMIT AN EVALUATION For a chance to win an 8GB ZUNE! Submit evaluations on MySPC www.MicrosoftSharePointConference.com

  29. © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

More Related