25
Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy www.sharemuch.com @spentsarsky

Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy @spentsarsky

Embed Size (px)

Citation preview

Page 1: Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy  @spentsarsky

Microsoft SharePoint Server 2010 for the Microsoft ASP.NET DeveloperYaroslav Pentsarskyywww.sharemuch.com@spentsarsky

Page 2: Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy  @spentsarsky

About me

• Involved in SharePoint since 2003• SharePoint book author• SharePoint MVP (2009-Present)• Twitter: @spentsarsky• Blog: sharemuch.com

Page 3: Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy  @spentsarsky

Agenda

• Why are we talking about SharePoint?• SharePoint development basics• Web Parts• List Templates and Instances• List Event Receivers

• Business Connectivity Services• Customizing SharePoint user interface

Page 4: Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy  @spentsarsky

SharePoint Basics

Page 5: Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy  @spentsarsky

Why SharePoint?

SharePointNo PlatformData Storage

Presentation

Security

Scalability

API’s

Office Integration

Features

Data Storage

Presentation

Security

Scalability

API’s

Office Integration

Features

Custom

Custom

Out of the Box

Page 6: Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy  @spentsarsky

SharePoint Terminology

FarmFeature

Solution PackageEvent Receiver

Web Application

Web Part

Site Definition

CAML

Feature Receiver

Central Administration

Declarative Workflow

Client Object Model

Timer Job

List Definition

List Instance

Content Database

Content Type

Persisted Object

Site ColumnSite Collection

Elevated Privileges

Theme

Application PageSafe ControlScope

ONET

Publishing Page

Field Control

Layout Page

Team SiteList View

STSADM

Page 7: Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy  @spentsarsky

SharePoint ArchitectureServer Farm

Web Application

Site Collection

Web

Web Parts Features Content Types

Site Columns

Features Lists Workflows

Templates

Layouts Alerts

Databases Solutions Service Applications Monitoring Security Policies

Providers Throttling ManagedPaths Quotas Permissions

Page 8: Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy  @spentsarsky

Server Farms• A collection of SharePoint role

servers and a SQL database server

• Servers can perform one or more functions

• Farm-level features are managed via Central Administration

• Solution Packages allow custom code to be deployed across the farm

Web Front Ends

Application

Database

Page 9: Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy  @spentsarsky

Web Applications and Site Collections• Web application = IIS Virtual

Server• Each web application may

be assigned its own app pool

• Web applications may utilize multiple service applications

• Site collections reside within web applications

Portal

MySites

Central Administration

HR

Finance

Marketing

Page 10: Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy  @spentsarsky

Packaging and Deployment

Page 11: Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy  @spentsarsky

Solution Packages• Solution Packages are sets of

functionality deployed to the farm or site collection (sandbox)

• May contain one or more Features, assemblies, pages, controls, and other artifacts

• SharePoint framework handles installation and configuration of solution items

• Automated packaging and deployment in Visual Studio 2010

Web Parts

Assemblies

MappedFolders

WSP

Page 12: Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy  @spentsarsky

Features• A ‘Feature’ is a defined set of

functionality encapsulated within a specific format

• Features may be comprised of any combination of code, including web parts, workflows, and site definitions

• Features may be deployed individually or as a part of the solution package

Solution

Feature

XML

ReceiverAssembly

Project ItemWeb Part Template Workflow

Page 13: Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy  @spentsarsky

Common Artifacts

Page 14: Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy  @spentsarsky

Web Parts• Web Parts are a specific type of

server control that inherit from System.Web.UI.WebPart

• Web Parts contain functionality that is exposed to the user in the context of a Web Part Page

• Classic Web Parts do not have an IDE; Visual Web Parts host ASP.NET User Controls

• Web Parts execute in the context of the current user

Page

• Form• Web Part• Controls

Page 15: Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy  @spentsarsky

demoBuilding a Visual Web Part

Page 16: Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy  @spentsarsky

List Elements, Types and Views• Lists are virtual data repositories for

unstructured content• Fields defined by associated content

types and user-defined columns• Common lists types included OOTB• List data is stored in the content

database associated with the site collection

• Lists have associated views defined in UI or CAML

• Fields• Views• ValidationList

Page 17: Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy  @spentsarsky

demoCreating a list definition

Page 18: Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy  @spentsarsky

Event Receivers• Event Receivers are handler

assemblies that respond to events on specific objects (Webs, Lists, Features, etc.)

• Event receivers override built-in methods

• Event Receivers have no UI or user feedback mechanism

• Event Receivers must run with Full Trust in the GAC

Event

ContentDatabase

Code?

Page 19: Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy  @spentsarsky

demoAttaching an Event Receiver to a

List

Page 20: Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy  @spentsarsky

Business Connectivity Service• Business Connectivity Service (BCS)

is a service application managing access to external data stores using SharePoint API

• BCS models define how the data is going to be accessed what operation are allowed on retrieved data

• Users can view external data in a list

External List

External Data Store

List Item

Page 21: Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy  @spentsarsky

demoCreating BCS connection to a SQL

Database

Page 22: Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy  @spentsarsky

Sandbox Solutions• Trusted solutions which run in

isolated process• Uploaded to solution directory in

site collection• Administratively controlled via

quotas (can be automatically disabled)

• Ability to use trusted proxy for restricted operations

Full Object Model

Subset Object Model

MyWebPart.dll

Proxy

Runtime

Page 23: Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy  @spentsarsky

demoCustomizing SharePoint user

interface

Page 24: Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy  @spentsarsky

Next Steps

• Download: 2010 IW Demo VM• SharePoint Easy Setup for Developers• http://blogs.msdn.com/b/cjohnson/archive/2010/10/28/a

nnouncing-sharepoint-easy-setup-for-developers.aspx

• Setting Up the Development Environment for SharePoint 2010• http://

msdn.microsoft.com/en-us/library/ee554869(office.14).aspx

Page 25: Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy  @spentsarsky

Resources

• General SharePoint info http://sharepoint.microsoft.com

• My Blog/Bookshttp://www.sharemuch.com

• Official SharePoint Team Blog – http://blogs.msdn.com/sharepoint