1 / 28

Mick Badran Breeze Training Consulting Trainer and Sharepoint Specialist

NET Development on Microsoft SharePoint Technology Part 4: Templates, Features, and Solution Deployment. Mick Badran Breeze Training Consulting Trainer and Sharepoint Specialist mickb@breezetraining.com.au. User Interface Entry Points. SPUser.About. Mick Badran

nizana
Télécharger la présentation

Mick Badran Breeze Training Consulting Trainer and Sharepoint Specialist

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. NET Development on Microsoft SharePoint TechnologyPart 4: Templates, Features, and Solution Deployment • Mick BadranBreeze TrainingConsulting Trainer and Sharepoint Specialist mickb@breezetraining.com.au

  2. User Interface Entry Points

  3. SPUser.About • Mick Badran • Director Breeze Training (www.breezetraining.com.au) • SharePoint 2001/2003 Experience • Lots of training/mentoring and consulting on small, medium and large scale projects. • Involved in TAP programs, Microsoft Ascend training, development of SPS Training material. • SharePoint 2007 Experience • Early start in June 2005 with TAP workshops • Creation and delivery of Ascend training Australia wide. • Sharepoint migrations and implementations. • Creator of successful Australia wide MOSS bootcamps for Partners. • Contact Details • Email: mickb@brezetraining.com.au • IM: mickb@breezetraining.com.au • Blog: http://blogs.breezetraining.com.au/mickb

  4. Agenda • Site Provisioning Flow in WSS and MOSS • A Closer Look at Site Definitions • Steps for Creating Custom Site Definitions • The Features feature in WSS 3.0 • Exploring and Creating Features • Activation Dependencies and Feature Event Receivers • Packaging, Deploying, Upgrading, Retracting and Removing SharePoint Solutions

  5. Site Provisioning • Two-step process • Creation of a site at a specific URL • Populating the site based on a site template • Designed to be a platform that can support different types of sites - the template architecture can be extended • Site templates • Use browser to save an existing site as a template • Stored in the database • Can be extracted as STP file • Create site definition • Collection of files making up the template • Stored on the front-end Web server as a physical folder

  6. The Provisioning Flow Webtemp.xml Webtemp*.xml Webtempsps.xml Selection of a site template RetrieveSite Definition in \12\Templates\SiteTemplates Call to Microsoft.SharePoint.Publishing.PortalProvisioningProvider PortalWebmanifest.xml InternetBlank.xml 1 Site Portal = # Sites

  7. Internet Starter Kit

  8. Improvements to v3 Site Definitions GLOBAL Template Resources Features

  9. Closer Look at ONET.XML • ONET.XML stores the core definition • Global Template stores common definitions ONET.XML navigation bars list templates document templates configurations features modules

  10. Dissecting the Team Site Definition

  11. Creating Custom Site Definitions with VS.NET Extensions for WSS 3.0 • Visual Studio Tools for Sharepoint • Visual Studio 2005 Project Templates • Web Part • Team Site Definition • Blank Site Definition • List Definition • Visual Studio 2005 Item Templates • Web Part • Custom Field • List Definition (with optional Event Receiver) • Content Type (with optional Event Receiver) • Module • SharePoint Solution Generator • Generates a Site Definition project from an existing SharePoint site.

  12. Reverse Engineering a Site with the SharePoint Solution Generator

  13. Modular Provisioning: Features! • Reusable pieces of customization • Extend existing sites • Easily installed/activated Elements.xml Custom Actions Custom Views Content Type Definitions Layouts Pages Modules (files) List Instances List Templates Event Receivers Delegate Controls Workflow Bindings Feature Name ID Description ScopeReceiver assembly Activation Dependencies Element Manifests Feature.xml

  14. Feature - Scopes

  15. WSS Out-Of-The-Box Features Farm Features WSS Core Links ContentLight Up Site Collection Features Core Content Types Core Column Templates Basic Web Parts Web Features Document Libraries Picture Libraries Basic List Links Team Collaboration Announce- ments Tasks Contacts Events Survey Discussion Board Visible Features Hidden Features

  16. Exploringsome of the OOTB Features

  17. Making Features Available • Features must becopiedto \12\Template\Features folder of every Front-end Web Server • Features must be installed • Administrators can activate or deactivate features using • The browser • Using STSADM • Event handlers can be hooked-up with the activate and deactivate events Stsadm.exe –o installfeature –filename myfeature\feature.xml Stsadm.exe –o activatefeature –filename myfeature\feature.xml –url url

  18. Create! Install! Activate! And Ready To Use!

  19. Activation Dependencies • Features can be designed with dependencies • Allows one feature to assume another feature is present • Example: Feature B might depend on Feature A • B should be written with activation dependency on A • Activating B forces A to be activated as well • Deactivating B results in deactivation of A • Features can be defined as hidden • Hides the feature from users in administration activation pages • Hidden features still activated by others with dependencies

  20. Feature Provisioning Events Define the receiver class by inheriting from SPFeatureReceiver namespace Litware { public class MyFeatureReceiver : Microsoft.SharePoint.SPFeatureReceiver { public override void FeatureInstalled(SPFeatureReceiverProperties properties) { // event hander run after feature is installed } public override void FeatureActivated(SPFeatureReceiverProperties properties) { // event hander run after feature is activated SPWeb web = (SPWeb)properties.Feature.Parent; web.Title = "Hello World"; web.Update(); } public override void FeatureDeactivating(SPFeatureReceiverProperties properties) { // event hander run before feature is deactivated } public override void FeatureUninstalling(SPFeatureReceiverProperties properties) { // event hander run before feature is uninstalled } } } Point to receiver class in Feature.xml (assembly must be in GAC) <Feature Id="9D2F3359-7664-430b-9391-143A7CCD2942" ReceiverAssembly="LitwareAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=xyz" ReceiverClass="Litware.LitwareFeatureReceiver" xmlns="http://schemas.microsoft.com/sharepoint/"> </Feature>

  21. Feature Event Receivers

  22. SharePoint Solutions • SharePoint Solution Packages allowyou to physicallydistributeyour solutions • Web Parts • Site Definitions • Features • Custom Workflows • Application and Site Pages • … Component Component Manifest MakeCab WSP DDF Component Component

  23. ExamplePackaging a Site Definition Site DefinitionSchemas DDF ONET.XML WebtempMySite.xml ProvisionCode MySite.dll MySite.WSP ProvisionFeature feature.xml provisioner.xml Site DefinitionFeature feature.xml elementManifest.xml # Features(lists/libraries) feature.xml elementManifest.xml InstallationScript Manifest.xml

  24. Packaging SharePoint Solutions

  25. A Complete SharePoint Solution Story • Solutions canbeadded to the Solution Store of the server farm • Solutions canbedeployed to site collections • Solutions canbeupgradedwith new versions • Solutions canberetractedfrom site collections • Solutions canberemovedfrom the Solution Store

  26. Deploying and Upgrading SharePoint Solutions

  27. Review • Better story for creating custom site definitions • Modularapproachwith Features • Better story for packaging, deploying and maintaining solutions • Thankyoulinesman…..thankyouball boys……

More Related