Anatomy Of A Share Point Solution
Upcoming SlideShare
Loading in...5
×
 

Anatomy Of A Share Point Solution

on

  • 1,020 views

Slide deck from the Developer 101 Session: Anatomy of a SharePoint Solution....

Slide deck from the Developer 101 Session: Anatomy of a SharePoint Solution.

This deck accompanied the session that discussed why it's important to use a solution deployment package (wsp) with SharePoint and the basic constructs of a the Solution Manifest File.

Statistics

Views

Total Views
1,020
Views on SlideShare
988
Embed Views
32

Actions

Likes
0
Downloads
16
Comments
0

5 Embeds 32

http://www.gscottsingleton.com 26
http://gscottsingleton.com 2
http://www.linkedin.com 2
http://www.slideshare.net 1
http://www.lmodules.com 1

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • This is a Introductory Class <br /> Doctor Strangelove! Anyone Get it <br /> Prize for questions. What file format is a WSP? What does DDF Stand for? (CABinet, Diamond Directive File)
  • Developing Software Since 1989, Cobol->Clipper 87->Pascal->FoxPro->C++->C# <br /> Took a year off to build a house, Summer off to chase the pipe dream of being an FF Guide <br /> Got lucky enough to get in on SharePoint before the boom <br /> in the SharePoint 2010 TAP Program
  • I tweet frequently, Really need to blog more. <br /> Next Slide is HAWT - Ask Why do I work with SharePoint?
  • I work with SharePoint &#x2018;cause the chicks dig it!
  • this is what I saw when I installed screen caps on devs boxes. But no worries I added a &#x201C;Fail&#x201D; catcher! it didn&#x2019;t work. This slide ends when mouse hovers Web Service Name. Next Slide is Ransom Note
  • This is the type of ransom note I used to get from my developers when they&#x2019;d go out to clients
  • This is actually my #1 Rule for my developers/Designers. #2 is learning what an IDisposable Object is (SPDispose is not an excuse to be a poor programmer)
  • this is 5 min 5 seconds.
  • because you&#x2019;re going to go out and BING it, Yes Virginia, it&#x2019;s a verb now, and you&#x2019;re going to look for the CAML.NET intellisense intal for VS 2008
  • because when you add in CAML intellisense into Visual Studio you make the whole think easy-peasy-lemon-squeezy. So what do all these XML elements and attributes mean? What can I put into a Manifest File?
  • I can Add Feature Manifests. Explain Features. <br /> 1-include child features CAML files <br /> 2-Location is alwys relative <br /> 3 -basically copies the stuff declared in the feature CAML into a Hive Location
  • I can Add Feature Manifests. Explain Features. <br /> 1-include child features CAML files <br /> 2-Location is alwys relative <br /> 3 -basically copies the stuff declared in the feature CAML into a Hive Location
  • I can Add Feature Manifests. Explain Features. <br /> 1-include child features CAML files <br /> 2-Location is alwys relative <br /> 3 -basically copies the stuff declared in the feature CAML into a Hive Location
  • The Assemblies region <br /> 1-Processes when solution is deployed <br /> 2-Adds assemblies to the bin or gac <br /> 3-Allows you to specify Safe Control Types
  • Application Resource Region <br /> 1-Same deal with processing scope <br /> please files in the resource dir of IIS Folder
  • Application Resource Region <br /> 1-Same deal with processing scope <br /> please files in the resource dir of IIS Folder
  • Template File Region <br /> Do I really need to mention when this gets processed? it&#x2019;s in the manifest so it gets processed when the solution is deployed. - Files here get copied into the Hive&#x2019;s Template Directory.. the LayoutsMyFirstSolution folder to be specific
  • RootFiles -kinda the same as template files but back one directory -- relative to the actual 12 HIVE folder
  • RootFiles -kinda the same as template files but back one directory -- relative to the actual 12 HIVE folder
  • DWPFiles <br /> Copies WebPart definition files to wpCatalog directory - this is called featureless webparts. <br /> Misnomer, archaic, handles both v2 (.dwp) and v3 (.webpart) files
  • DWPFiles <br /> Copies WebPart definition files to wpCatalog directory - this is called featureless webparts. <br /> Misnomer, archaic, handles both v2 (.dwp) and v3 (.webpart) files
  • So where does this all go, recap.

Anatomy Of A Share Point Solution Anatomy Of A Share Point Solution Presentation Transcript

  • So what is a SharePoint Solution?
  • So what is a SharePoint Solution?
  • So what is a SharePoint Solution? -It’s a Cabinet File with the extension .WSP
  • So what is a SharePoint Solution? -It’s a Cabinet File with the extension .WSP -It installs STUFF in the hive
  • So what is a SharePoint Solution? -It’s a Cabinet File with the extension .WSP -It installs STUFF in the hive -it can install assemblies in the bin fldr or gac
  • So what is a SharePoint Solution? -It’s a Cabinet File with the extension .WSP -It installs STUFF in the hive -it can install assemblies in the bin fldr or gac -It can install feature definitions/site definitions
  • So what is a SharePoint Solution? -It’s a Cabinet File with the extension .WSP -It installs STUFF in the hive -it can install assemblies in the bin fldr or gac -It can install feature definitions/site definitions -It can install class resources
  • So what is a SharePoint Solution? -It’s a Cabinet File with the extension .WSP -It installs STUFF in the hive -it can install assemblies in the bin fldr or gac -It can install feature definitions/site definitions -It can install class resources -It can install web part packages
  • So what is a SharePoint Solution? -It’s a Cabinet File with the extension .WSP -It installs STUFF in the hive -it can install assemblies in the bin fldr or gac -It can install feature definitions/site definitions -It can install class resources -It can install web part packages zomg! then why doesn’t everyone use it?
  • So What Just Happened?
  • So What Just Happened? Solution was added to farm (Via StsAdm in this case) Manifest Examined, Features extracted to: [Hive]TemplateFeatures[foo]
  • So What Just Happened? Solution was added to farm (Via StsAdm in this case) Manifest Examined, Features extracted to: [Hive]TemplateFeatures[foo] Solution Gets Deployed via timer jobs - global items go into hive, items for apps provisioned out to wfes etc.
  • So What Just Happened? Solution was added to farm (Via StsAdm in this case) Manifest Examined, Features extracted to: [Hive]TemplateFeatures[foo] Solution Gets Deployed via timer jobs - global items go into hive, items for apps provisioned out to wfes etc. Features then available and activating them provisions the items specified in the feature elements file.
  • The Anatomy of a Solution <?xml version="1.0"?> <Solution SolutionId="ee89a307-dc72-4622-9f81-a424ff247c1f" xmlns="http://schemas.microsoft.com/sharepoint/"> <Assemblies> <Assembly Location="WSP1.dll" DeploymentTarget="GlobalAssemblyCache" /> </Assemblies> <TemplateFiles> <TemplateFile Location="LAYOUTSMYfirstSolutionSampleService.asmx" /> </TemplateFiles> </Solution>
  • The Anatomy of a Solution Manifest.xml <?xml version="1.0"?> <Solution SolutionId="ee89a307-dc72-4622-9f81-a424ff247c1f" xmlns="http://schemas.microsoft.com/sharepoint/"> <Assemblies> <Assembly Location="WSP1.dll" DeploymentTarget="GlobalAssemblyCache" /> </Assemblies> <TemplateFiles> <TemplateFile Location="LAYOUTSMYfirstSolutionSampleService.asmx" /> </TemplateFiles> </Solution>
  • The Anatomy of a Solution Manifest.xml Set’s the solution ID which is a GUID <?xml version="1.0"?> <Solution SolutionId="ee89a307-dc72-4622-9f81-a424ff247c1f" xmlns="http://schemas.microsoft.com/sharepoint/"> <Assemblies> <Assembly Location="WSP1.dll" DeploymentTarget="GlobalAssemblyCache" /> </Assemblies> <TemplateFiles> <TemplateFile Location="LAYOUTSMYfirstSolutionSampleService.asmx" /> </TemplateFiles> </Solution>
  • The Anatomy of a Solution Manifest.xml Set’s the solution ID which is a GUID Installs Assemblies, GAC or Local <?xml version="1.0"?> <Solution SolutionId="ee89a307-dc72-4622-9f81-a424ff247c1f" xmlns="http://schemas.microsoft.com/sharepoint/"> <Assemblies> <Assembly Location="WSP1.dll" DeploymentTarget="GlobalAssemblyCache" /> </Assemblies> <TemplateFiles> <TemplateFile Location="LAYOUTSMYfirstSolutionSampleService.asmx" /> </TemplateFiles> </Solution>
  • The Anatomy of a Solution Manifest.xml Set’s the solution ID which is a GUID Installs Assemblies, GAC or Local Installs HIve files <?xml version="1.0"?> <Solution SolutionId="ee89a307-dc72-4622-9f81-a424ff247c1f" xmlns="http://schemas.microsoft.com/sharepoint/"> <Assemblies> <Assembly Location="WSP1.dll" DeploymentTarget="GlobalAssemblyCache" /> </Assemblies> <TemplateFiles> <TemplateFile Location="LAYOUTSMYfirstSolutionSampleService.asmx" /> </TemplateFiles> </Solution>
  • The Anatomy of a Solution Manifest.xml Set’s the solution ID which is a GUID Installs Assemblies, GAC or Local Installs HIve files includes feature.xml feature defs <?xml version="1.0"?> <Solution SolutionId="ee89a307-dc72-4622-9f81-a424ff247c1f" xmlns="http://schemas.microsoft.com/sharepoint/"> <Assemblies> <Assembly Location="WSP1.dll" DeploymentTarget="GlobalAssemblyCache" /> </Assemblies> <TemplateFiles> <TemplateFile Location="LAYOUTSMYfirstSolutionSampleService.asmx" /> </TemplateFiles> </Solution>
  • The Anatomy of a Solution Manifest.xml Set’s the solution ID which is a GUID Installs Assemblies, GAC or Local Installs HIve files includes feature.xml feature defs <?xml version="1.0"?> <Solution SolutionId="ee89a307-dc72-4622-9f81-a424ff247c1f" xmlns="http://schemas.microsoft.com/sharepoint/"> CAML!? CAML! YUK! <Assemblies> <Assembly Location="WSP1.dll" DeploymentTarget="GlobalAssemblyCache" /> </Assemblies> <TemplateFiles> <TemplateFile Location="LAYOUTSMYfirstSolutionSampleService.asmx" /> </TemplateFiles> </Solution>
  • bing it FTW!
  • Getting Intellisense in VS makes it easy-peasy- lemon-squeezy!
  • FeatureManifest <FeatureManifests> <!--This Reference is relative to the Location in YOUR CAB!! --> <FeatureManifest Location="MyFirstFeatureFeature.xml"/> <FeatureManifest Location="MySecondFeatureFeature.xml"/> </FeatureManifests>
  • FeatureManifest Includes Child Feature Manifest CAML Files <FeatureManifests> <!--This Reference is relative to the Location in YOUR CAB!! --> <FeatureManifest Location="MyFirstFeatureFeature.xml"/> <FeatureManifest Location="MySecondFeatureFeature.xml"/> </FeatureManifests>
  • FeatureManifest Includes Child Feature Manifest CAML Files Location is relative to root of your solution CAbinet file <FeatureManifests> <!--This Reference is relative to the Location in YOUR CAB!! --> <FeatureManifest Location="MyFirstFeatureFeature.xml"/> <FeatureManifest Location="MySecondFeatureFeature.xml"/> </FeatureManifests>
  • FeatureManifest Includes Child Feature Manifest CAML Files Location is relative to root of your solution CAbinet file basically copies the manifest to hive and includes the files defined in the feature caml (more later..) <FeatureManifests> <!--This Reference is relative to the Location in YOUR CAB!! --> <FeatureManifest Location="MyFirstFeatureFeature.xml"/> <FeatureManifest Location="MySecondFeatureFeature.xml"/> </FeatureManifests>
  • The Assemblies Region Processes when solution is deployed adds your assemblies to local bin or GAC allows you to specify safe control types
  • The ApplicationResources
  • The ApplicationResources Again - ‘Cause it’s in the Manifest it processes when solution is deployed
  • The ApplicationResources Again - ‘Cause it’s in the Manifest it processes when solution is deployed Places files in the Resources DIR of the root IIS folder of deployed web applications
  • The TemplateFiles Region Do I need to mention it again? Copies Files into the HIVE Under the Template directory
  • The RootFiles Region
  • The RootFiles Region Copies files to a location off the root HIVE
  • The RootFiles Region Copies files to a location off the root HIVE Really the best place to put global web services, etc.
  • DwpFiles Region <DwpFiles> <DwpFile Location="MyNonFeatureWebPart.webpart" /> </DwpFiles>
  • DwpFiles Region Copies Featureless WebPart Definitions to Web Applications (Huh?) <DwpFiles> <DwpFile Location="MyNonFeatureWebPart.webpart" /> </DwpFiles>
  • DwpFiles Region Copies Featureless WebPart Definitions to Web Applications (Huh?) Supports either v2 (.DWP) or V3 (.webpart) definition files <DwpFiles> <DwpFile Location="MyNonFeatureWebPart.webpart" /> </DwpFiles>
  • Quick-Tip Manifest Location Summary Assemblies The parameter DeploymentTarget determines whether to deploy the assembly to the GAC or to a directory (WebApplication). With the GAC option assemblies are copied to C:WINDOWSassembly. With the WebApplication option the files are copied to C:InetpubwwwrootwssVirtualDirectories80bin. Features: C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12TEMPLATEFEATURES TemplateFiles: C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12TEMPLATE Application Resources: C:InetpubwwwrootwssVirtualDirectories{virtual app port}resources Global resources: C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12TEMPLATEFEATURES Web Parts: C:InetpubwwwrootwssVirtualDirectories80wpcatalog Site definitions The SiteDefinitionManifests list contains descriptions of all site definition folders. The Location attribute defines the name of the folder that contains the site definition. This folder contains the ONET.xml and other components of the site definition. Target Folder: C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12TEMPLATESiteTemplates
  • The Feature Files if you thought the manifest was complicated...
  • The real meat of a feature
  • The real meat of a feature The Element Manifest - or more aptly put the SharePoint CAML definitions of what the feature does. <ElementManifests> <ElementManifest Location="MySiteColumns.xml"/> <ElementManifest Location="MyContentTypes.xml"/> <ElementManifest Location="MyListDefs.xml"/> <ElementManifest Location="MyListInstances.xml"/> <ElementManifest Location="ICouldGoOnandOn.xml"/> </ElementManifests>
  • The basic CAML elements
  • The basic CAML elements <?xml version="1.0" encoding="utf-8" ?>
  • The basic CAML elements <?xml version="1.0" encoding="utf-8" ?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  • The basic CAML elements <?xml version="1.0" encoding="utf-8" ?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <ContentType></ContentType>
  • The basic CAML elements <?xml version="1.0" encoding="utf-8" ?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <ContentType></ContentType> <ContentTypeBinding/>
  • The basic CAML elements <?xml version="1.0" encoding="utf-8" ?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <ContentType></ContentType> <ContentTypeBinding/> <HideCustomAction/>
  • The basic CAML elements <?xml version="1.0" encoding="utf-8" ?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <ContentType></ContentType> <ContentTypeBinding/> <HideCustomAction/> <Control></Control>
  • The basic CAML elements <?xml version="1.0" encoding="utf-8" ?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <ContentType></ContentType> <ContentTypeBinding/> <HideCustomAction/> <Control></Control> <CustomAction></CustomAction>
  • The basic CAML elements <?xml version="1.0" encoding="utf-8" ?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <ContentType></ContentType> <ContentTypeBinding/> <HideCustomAction/> <Control></Control> <CustomAction></CustomAction> <CustomActionGroup></CustomActionGroup>
  • The basic CAML elements <?xml version="1.0" encoding="utf-8" ?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <ContentType></ContentType> <ContentTypeBinding/> <HideCustomAction/> <Control></Control> <CustomAction></CustomAction> <CustomActionGroup></CustomActionGroup> <DocumentConverter/>
  • The basic CAML elements <?xml version="1.0" encoding="utf-8" ?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <ContentType></ContentType> <ContentTypeBinding/> <HideCustomAction/> <Control></Control> <CustomAction></CustomAction> <CustomActionGroup></CustomActionGroup> <DocumentConverter/> <FeatureSiteTemplateAssociation></FeatureSiteTemplateAssociation>
  • The basic CAML elements <?xml version="1.0" encoding="utf-8" ?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <ContentType></ContentType> <ContentTypeBinding/> <HideCustomAction/> <Control></Control> <CustomAction></CustomAction> <CustomActionGroup></CustomActionGroup> <DocumentConverter/> <FeatureSiteTemplateAssociation></FeatureSiteTemplateAssociation> <Field></Field>
  • The basic CAML elements <?xml version="1.0" encoding="utf-8" ?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <ContentType></ContentType> <ContentTypeBinding/> <HideCustomAction/> <Control></Control> <CustomAction></CustomAction> <CustomActionGroup></CustomActionGroup> <DocumentConverter/> <FeatureSiteTemplateAssociation></FeatureSiteTemplateAssociation> <Field></Field> <ListInstance></ListInstance>
  • The basic CAML elements <?xml version="1.0" encoding="utf-8" ?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <ContentType></ContentType> <ContentTypeBinding/> <HideCustomAction/> <Control></Control> <CustomAction></CustomAction> <CustomActionGroup></CustomActionGroup> <DocumentConverter/> <FeatureSiteTemplateAssociation></FeatureSiteTemplateAssociation> <Field></Field> <ListInstance></ListInstance> <ListTemplate></ListTemplate>
  • The basic CAML elements <?xml version="1.0" encoding="utf-8" ?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <ContentType></ContentType> <ContentTypeBinding/> <HideCustomAction/> <Control></Control> <CustomAction></CustomAction> <CustomActionGroup></CustomActionGroup> <DocumentConverter/> <FeatureSiteTemplateAssociation></FeatureSiteTemplateAssociation> <Field></Field> <ListInstance></ListInstance> <ListTemplate></ListTemplate> <Module></Module>
  • The basic CAML elements <?xml version="1.0" encoding="utf-8" ?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <ContentType></ContentType> <ContentTypeBinding/> <HideCustomAction/> <Control></Control> <CustomAction></CustomAction> <CustomActionGroup></CustomActionGroup> <DocumentConverter/> <FeatureSiteTemplateAssociation></FeatureSiteTemplateAssociation> <Field></Field> <ListInstance></ListInstance> <ListTemplate></ListTemplate> <Module></Module> <Receivers></Receivers>
  • The basic CAML elements <?xml version="1.0" encoding="utf-8" ?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <ContentType></ContentType> <ContentTypeBinding/> <HideCustomAction/> <Control></Control> <CustomAction></CustomAction> <CustomActionGroup></CustomActionGroup> <DocumentConverter/> <FeatureSiteTemplateAssociation></FeatureSiteTemplateAssociation> <Field></Field> <ListInstance></ListInstance> <ListTemplate></ListTemplate> <Module></Module> <Receivers></Receivers> <UserMigrator/>
  • The basic CAML elements <?xml version="1.0" encoding="utf-8" ?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <ContentType></ContentType> <ContentTypeBinding/> <HideCustomAction/> <Control></Control> <CustomAction></CustomAction> <CustomActionGroup></CustomActionGroup> <DocumentConverter/> <FeatureSiteTemplateAssociation></FeatureSiteTemplateAssociation> <Field></Field> <ListInstance></ListInstance> <ListTemplate></ListTemplate> <Module></Module> <Receivers></Receivers> <UserMigrator/> <Workflow></Workflow>
  • The basic CAML elements <?xml version="1.0" encoding="utf-8" ?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <ContentType></ContentType> <ContentTypeBinding/> <HideCustomAction/> <Control></Control> <CustomAction></CustomAction> <CustomActionGroup></CustomActionGroup> <DocumentConverter/> <FeatureSiteTemplateAssociation></FeatureSiteTemplateAssociation> <Field></Field> <ListInstance></ListInstance> <ListTemplate></ListTemplate> <Module></Module> <Receivers></Receivers> <UserMigrator/> <Workflow></Workflow> </Elements>
  • Now that I’ve pulled out your fingernails...
  • Now that I’ve pulled out your fingernails... If there’s anyone left in the room
  • Now that I’ve pulled out your fingernails... If there’s anyone left in the room Let’s look at the ways to reduce the level of effort!
  • DEMO
  • Thanks for spending your valuable Saturday with us! http://gscottsingleton.com scott@gscottsingleton.com twitter: @scottsingleton
  • http://shareclave.org