1 / 28

Understanding Features & Solutions In MOSS 2007

Kfir Sasson. Understanding Features & Solutions In MOSS 2007. Agenda. Why Features?. Features Implementation. Sharepoint Solutions. Features - Intro. Do you really have only 1 environment? What is the wrong way?? Backup <-> Restore

field
Download Presentation

Understanding Features & Solutions In MOSS 2007

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. Kfir Sasson Understanding Features & Solutions In MOSS 2007

  2. Agenda Why Features? Features Implementation Sharepoint Solutions

  3. Features- Intro • Do you really have only 1 environment? • What is the wrong way?? • Backup <-> Restore • Maybe Making the necessary Customization on every environment? • Copy recourses & assemblies manually or by a script • Reusability of developed component – • hard work for the site designers

  4. Features • Reduce Complexity • No need to copy code • Reduce versioning and inconsistency issues • Easier to activate or deactivate functionality • in deployment • Control site behavior by toggling a Feature • on or off in the UI

  5. Features - Capabilities • Scoping • Installing or uninstalling Features within • a deployment • Activating or deactivating Features at • a given scope • Property bag for storing data required by • a Feature

  6. Features - Scope Farm Elements Item Custom ActionsSite Settings LinksAdmin Custom Actions Web Application Elements Item Custom ActionsSite Settings LinksAdmin Custom Actions Site Settings LinksSite Web Part DefinitionsWorkflow DefinitionsSite Content TypesLayout FilesList Instances Site Collection Elements List Definition + Forms + ViewsList InstancesList Item EventsItem Custom ActionsWeb Admin Custom ActionsLayout Files Web Elements

  7. Features - Implementation • The Feature subfolder includes a Feature.xml • file • Install and activate the feature using command • line or API • A Feature can be hidden • Features can have dependencies • Use EventReceiver (SPFeatureReceiver) to trap • feature events • Validate against wss.xsd schema

  8. Features – Install and activate • All features must be copied in to the • features folder • All features must be installed on the farm • A feature has effect on its scope only after • activation • Use Command line : stsadm.exe ‘ Install the feature stsadm -o installfeature -filename BasicCollectFeedback\feature.xml –force ‘ Activate the feature stsadm -o activatefeature -filename BasicCollectFeedback\feature.xml -url %URL% ‘ Deactivate the feature stsadm -o deactivatefeature -filename BasicCollectFeedback\feature.xml -url %URL% ‘ Uninstall the feature stsadm -o uninstallfeature -filename BasicCollectFeedback\feature.xml

  9. Demo 1 – Create and Install a Feature 11

  10. Features – Element Types

  11. Features – Element Types

  12. Features – Content Type Element • Defines a content type that will be available • on the site • Control inheritance using the content type ID • Parent content type ID + two hexadecimal values • Parent content type ID + "00" + hexadecimal GUID • Connect existing fields to the content type • Custom Forms add\update\display item.

  13. Features – Module Element • specify files with which to provision SharePoint • sites. • Important attributes: • Name • List – list type number • Url – the url of the list • File Element • URL – the name of the file • Path – the path to the file • AllUsersWebPart – define webparts in a page

  14. Features – Delegate Control • Declare candidate controls for a particular • functionality • Provides a mechanism for choosing a single • functionality provider • Can replace the content of any • Sharepoint:DelegateControl • Union between server farm, Web application, • site collection, and Web site levels • The control that has the lowest sequence • number is added to the control tree by means • of the DelegateControl

  15. Features – Custom Action • A custom action represent • A link • Toolbar button • Menu item • any control that can be added to a toolbar or menu that a user sees • Add a control to toolbars

  16. Features – Useful Utilities • MOSS Feature Generator • Create site columns, list templates, content types features • Drag & Drop • Features created in a few minutes • Download from http://www.sharepointblogs.com/alfred/default.aspx • MOSS Publishing Feature Generator • Creates Module features with selected layouts and master pages • Very easy to use • Download from http://pubsitefeature.codeplex.com/

  17. Demo 2 – Develop Features 28

  18. Solutions - Intro • Now that we have features what is the best • way to deploy • Batch file • Develop an installer • Sharepoint Solutions

  19. Solutions • Bundle all of the components for extending • WSS • A solution file is a CAB-based format with • a .wsp extension • A unified infrastructure for deploying • solutions • Integrated deployment • Easily install files on the front-end Web servers in a server farm • Solution framework allows you to do the following • Deploy new solutions and upgrade existing solutions across the farm • Synchronize a front-end Web server so that its state is consistent with The state of other servers in the farm

  20. Solutions - Creating • Contains the following components • Site definitions • Feature definitions and their element definitions and files • Web Part files (*.webpart, *.dwp) • Template files and root files, which can include the following: • _layouts files • Resources (*.resx) • Resource files (for example, *.doc or *.xls) • Assemblies, which can include the following: • Safe control entries • Resources

  21. Solutions - Creating • DDF File • Declaration file for the cab creator utility • Use the makecab.exe utility • The format of a .ddf file is basically in the same style as the .inf file • declare a standard header and then enumerate • All files must be included • MakeCab /F soultion.ddf

  22. Solutions - Deploy • Use command line stsadm Stsadm –o addsolution –filename “wsp file” Stsadm –o deploysolution –name %packagename% -local – allowGacDeployment –url %TargetUrl% Stsadm –o retractsolution –name %packagename% -local –url %TargetUrl% Stsadm –o deletesolution –filename “%pakagename%”

  23. Solutions – Deploy • Deploy and retract in the admin site

  24. Solutions – Useful Utilities • WSPBuider • Automatically Creates the manifest file • Creating the wsp file for deployment • Very easy to use • Download from http://wspbuilder.codeplex.com/

  25. Solutions – Useful Utilities • Solution Installer • Add solution to the SharePoint solution store. • Deploy solution on one or more web applications. • Activate feature on one or more site collections Upgrade solution. • Retract and remove solution. • Download from http://www.codeplex.com/sharepointinstaller

  26. Demo 3 – Creating and Deploying Solutions 40

  27. Summary • Features are the proper way to add • functionality to Sharepoint • Site admins can control the functionally of the • site • Deployment becomes an easy job • Useful tools make the develop much simpler

  28. Thank You!Kfir SassonKfir.Sasson@Ness.ComNess Technologies 42

More Related