sharepoint 2010 development for asp.net developers - sharepoint saturday houston 2011

22
1 Welcome SharePoint 2010 Development for ASP.NET Developers

Upload: corey-roth

Post on 07-Dec-2014

3.227 views

Category:

Technology


0 download

DESCRIPTION

Slides from my Beginning SharePoint 2010 development talk for ASP.NET developers presented at SharePoint Saturday Houston 2011.

TRANSCRIPT

Page 1: SharePoint 2010 Development for ASP.NET Developers - SharePoint Saturday Houston 2011

1

WelcomeSharePoint 2010 Development for

ASP.NET Developers

Page 2: SharePoint 2010 Development for ASP.NET Developers - SharePoint Saturday Houston 2011

2

Welcome to SharePoint Saturday Houston

• Please turn off all electronic devices or set them to vibrate.• If you must take a phone call, please do so in the hall so as not

to disturb others.• Thanks to our Platinum Sponsors:

Thank you for being a part of the 2nd Annual SharePoint Saturday Houston

Page 3: SharePoint 2010 Development for ASP.NET Developers - SharePoint Saturday Houston 2011

3

Information• Speaker presentation slides will be available at

SharePointSaturday.org/Houston within a week• Keep checking website for future events• The Houston SharePoint User Group at

www.h-spug.org, will be having it’s May meeting this Wednesday on May 11th. Please be sure to join us!

• Have a great day!

Page 4: SharePoint 2010 Development for ASP.NET Developers - SharePoint Saturday Houston 2011

SharePoint 2010 Development for ASP.NET Developers

Corey RothBlog: www.dotnetmafia.comTwitter: @coreyroth

Page 5: SharePoint 2010 Development for ASP.NET Developers - SharePoint Saturday Houston 2011

Corey Roth

• SharePoint Solutions Architect for Stonebridge• Microsoft SharePoint MVP• Specializing in ECM and Search• Passed all SharePoint 2010 certification exams• Microsoft Solutions Advocate• E-mail: [email protected] • Twitter: @coreyroth• Blog: www.dotnetmafia.com• Laptop: Dell E6510 i5 2.4 GHz 8GB• Oracle VirtualBox 3.2.8 – 4GB on VM

Page 6: SharePoint 2010 Development for ASP.NET Developers - SharePoint Saturday Houston 2011

What’s new?

Visual Studio 2010!

Page 7: SharePoint 2010 Development for ASP.NET Developers - SharePoint Saturday Houston 2011

3-Minute Web Part Demo

Demo

Page 8: SharePoint 2010 Development for ASP.NET Developers - SharePoint Saturday Houston 2011

Getting Started

What do I need?

Page 9: SharePoint 2010 Development for ASP.NET Developers - SharePoint Saturday Houston 2011

You need…

RAM!

Page 10: SharePoint 2010 Development for ASP.NET Developers - SharePoint Saturday Houston 2011

To Virtualize or not?

With Virtualization Without Virtualization

Need 64 bit guest capable VM software

No virtualization software required

Requires more memory and disk space

Requires less memory and disk space

Prerequisite installer installs everything (almost)

Prerequisites have to be installed manually

Can be shut off when you are not using it

Services are always running unless you shut them off

Easier to restore when you mess up

Page 11: SharePoint 2010 Development for ASP.NET Developers - SharePoint Saturday Houston 2011

What else do I need?

• Windows Server 2008 R2 (or SP2) x64 / Windows 7 x64 for native installs

• SQL Server 2008 R2 (or SP1+CU2) x64 / SQL Server 2005 SP3 x64

• Virtualization Software (if virtualizing) – Oracle VirtualBox, VMWare Workstation, Hyper-V, etc.

• Complete requirements at http://technet.microsoft.com/en-us/library/cc262485.aspx

Page 12: SharePoint 2010 Development for ASP.NET Developers - SharePoint Saturday Houston 2011

SharePoint Basics

• Farm (SPFarm) – Represents the collection of servers of the SharePoint deployment

• Web Applications (SPWebApplication) – 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

• Solution (.wsp) – CAB file used for deployment

Page 13: SharePoint 2010 Development for ASP.NET Developers - SharePoint Saturday Houston 2011

SharePoint Root Folder (aka 14 Hive)

• Location of most key SharePoint files: C:\Program Files\Common Files\microsoft shared\Web Server Extensions\14

• Called 12 in WSS3

Folder Description

CONFIG Contains partial trust configuration files

ISAPI Binaries and SharePoint Web Services

LOGS Error Logs (look here first when you get a strange error)

TEMPLATE\CONTROLTEMPLATES User Controls

TEMPLATE\FEATURES SharePoint Features (turns functionality on and off)

TEMPLATE\IMAGES MainImages Folder

TEMPLATE\LAYOUTS Pages and Styles

Page 14: SharePoint 2010 Development for ASP.NET Developers - SharePoint Saturday Houston 2011

Solution Types

• Farm Solution – Same type of solution used in WSS3. No security restrictions unless using partial trust– Can be deployed with Full Trust or Partial Trust

• Sandboxed Solution – Deploys to the site collection with security limitations– Can only access a subset of the SharePoint object model– Cannot elevate privileges– Can only access artifacts in the site collection it was activated

on– Administrators can restrict the amount of resources available– Ideal for shared hosting environments / SharePoint Online

Page 15: SharePoint 2010 Development for ASP.NET Developers - SharePoint Saturday Houston 2011

Visual Web Part

• A glorified ASP.NET User Control with a Web Part wrapper• Built with a designer• Previously only available in Farm Solutions

– Sandbox compatible version available with Visual Studio 2010 SharePoint Power Tools

Page 16: SharePoint 2010 Development for ASP.NET Developers - SharePoint Saturday Houston 2011

Visual Web Part Demo

Demo

Page 17: SharePoint 2010 Development for ASP.NET Developers - SharePoint Saturday Houston 2011

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– A few if them do now in SharePoint 2010

• Most objects require a call to .Update to save any changes made

• Some API calls require elevated security – Pass a delegate to RunWithElevatedPrivleges

Page 18: SharePoint 2010 Development for ASP.NET Developers - SharePoint Saturday Houston 2011

Demo

Demo

Page 19: SharePoint 2010 Development for ASP.NET Developers - SharePoint Saturday Houston 2011

Deployment

• No manual configuration or third party add-ons required• Visual Studio builds features and solution package files for

you• Visual Studio deploys packages directly to SharePoint server• Solution packages can still be deployed to other servers via

PowerShell

Page 21: SharePoint 2010 Development for ASP.NET Developers - SharePoint Saturday Houston 2011

Questions?

Corey RothBlog: www.dotnetmafia.comTwitter: @coreyroth

Page 22: SharePoint 2010 Development for ASP.NET Developers - SharePoint Saturday Houston 2011

22

Thanks to our Sponsors