SharePoint Development For Asp Net Developers
Upcoming SlideShare
Loading in...5
×
 

SharePoint Development For Asp Net Developers

on

  • 3,003 views

Slides given for my talk about an introduction to SharePoint development at Oklahoma City Developer Group - December 2008.

Slides given for my talk about an introduction to SharePoint development at Oklahoma City Developer Group - December 2008.

Statistics

Views

Total Views
3,003
Views on SlideShare
2,996
Embed Views
7

Actions

Likes
0
Downloads
39
Comments
0

2 Embeds 7

http://www.linkedin.com 5
http://www.slideshare.net 2

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

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
  • Demo building a user control, deployment, and a web part to load that control.Explain Safe Controls_ControlTemplates folder
  • Explain the manifest.xml and cab.ddf
  • Demo building a web part. TestWebPart (System.Web.UI.WebControls.WebParts.WebPart)Feature.xmlElements.xmlMyWebPart.webpart
  • Demo building a feature receiver.TestFeatureReceiver.cs
  • Demo the use of BDC Tools, the MetaData Model and the Import Process

SharePoint Development For Asp Net Developers SharePoint Development For Asp Net Developers Presentation Transcript

  • SharePoint Development for ASP.NET Developers
    Presenter: Corey Roth
    Enterprise Consultant
    Stonebridge
    Blog: www.dotnetmafia.com
  • Corey Roth
    Consultant for Stonebridge
    Worked in Consumer Electronics, Travel, Advertising, and Energy industries
    Currently doing MOSS development specializing in Enterprise Search and ECM
    OSU Graduate
    Microsoft Award for Customer Excellence (ACE) Winner
    E-mail: corey.roth@gmail.com
    Blog: www.dotnetmafia.com (mirrored on sharepointblogs.com)
  • SharePoint 3.0 or MOSS 2007?
    SharePoint 3.0 (WSS) is included with Windows Server
    MOSS extends the features of WSS
    MOSS requires a separate license
    MOSS includes Business Data Catalog (BDC), Enterprise Seach, Excel Services, My Sites, KPI dashboards, People Search, Forms Services, etc.
  • Environment
    Virtualization – Windows Server, WSS or MOSS, and Visual Studio installed
    SharePoint on Remote Server – Requires remote debugging
    SharePoint on Vista – Works but not supported
  • SharePoint Basics
    Farm – Represents the collection of servers of the SharePoint deployment
    Web Applications – Typically one or more of these maps to a web site in IIS (i.e.: Port 80)
    Site Collection (SPSite) – Will have at least one. Groups sites together
    Site (SPWeb) – Represents a site or subsite in a Site Collection. Contains pages, lists, etc.
    Feature – Allows code and SharePoint changes to occur at the click of a button
  • What’s different about SharePoint development?
    Environment
    Deployment
    Pages and Sites
    Must deploy DLLs to GAC or use Code Access Security if deploying to bin folder
    User controls must be hosted by a web part
  • 12 Hive
    Location of most key SharePoint files: C:Program FilesCommon Filesmicrosoft sharedWeb Server Extensions12
  • 12 Hive (Continued)
  • Building a User Control with Visual Studio
    Web Application Project
    Reference Microsoft.SharePoint.dll
    Must be registered as safe for SharePoint to execute
    Typically deployed to bin folder using Code Access Security
    Controls are typically deployed to the CONTROLTEMPLATES folder in the 12 hive.
    _ControlTemplates Virtual Directory
    Complete instructions are on my blog
  • SafeControls
    SharePoint won’t execute a web part or user control unless it knows it is safe
    Declare an assembly and namespace safe in web.config
    SafeControls element
    Can be automated using a solution package (.wsp)
  • SharePoint API
    SPContext – Used to get reference to the current site or site collection
    All uses of SPSite or SPWeb must be disposed (use a using statement)
    Most collections do not have an “Exists” method
    Most objects require a call to .Update to save any changes made
    Some API calls require elevated security – Pass a delegate to RunWithElevatedPrivleges
  • Demo
  • Deployment Options
    Manually copy binaries, feature files, pages, and controls to appropriate folders on SharePoint server
    Create a Feature – Would still have to manually copy files
    Create a Solution Package (.wsp) – A cab file that contains a manfiest telling SharePoint how to deploy
  • What the Solution Package does…
    Backs up your web.config
    Changes the trust element to WSS_Custom in web.config
    Backs up trust configuration file – wss_minimaltrust.config becomes wss_custom_wss_minimaltrust.config
    Changes the path to the trust configuration file in the web.config <trustLevel> element
    Adds code access security settings from manifest.xml
    More information on my blog
  • Demo
  • Building and Deploying a Web Part
    Deploys similarly to a user control
    .webpart (or .dwp) file tells SharePoint where to find the web part’s code
    Use a feature to add the web part to the gallery
    Complete instructions can be found on my blog
  • Demo
  • Feature Receivers
    Feature Receivers allow you to execute code when a feature is Installed, Uninstalled, Activated, or Deactivated
    Create a class that inherits from SPFeatureReceiver
    Configured in Feature.xml
    SPFeatureProperties.Feature.Parent contains reference to SPWeb or SPSite object depending on scope of feature (must be cast)
  • Demo
  • References
    Dot Net Mafia Blog
    http://www.dotnetmafia.com
    Office SharePoint Server SDK
    http://msdn2.microsoft.com/en-us/library/ms550992.aspx
    STSDev
    http://www.codeplex.com/stsdev
    SharePoint Blogs
    http://www.sharepointblogs.com
  • Questions?
  • Thanks
    Corey Roth
    coreyroth@gmail.com
    www.dotnetmafia.com