the evolution of sharepoint event receivers from on-prem to the cloud @dogfoodcon september 29 th,...

13
The Evolution of SharePoint Event Receivers from On-Prem to the Cloud @DogFoodCon September 29 th , 2014 Timothy Ferro

Upload: pamela-lindsey

Post on 21-Dec-2015

214 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: The Evolution of SharePoint Event Receivers from On-Prem to the Cloud @DogFoodCon September 29 th, 2014 Timothy Ferro

The Evolution of SharePoint Event Receivers from On-Prem to the Cloud

@DogFoodConSeptember 29th, 2014

Timothy Ferro

Page 2: The Evolution of SharePoint Event Receivers from On-Prem to the Cloud @DogFoodCon September 29 th, 2014 Timothy Ferro

RDA Corporation

RDA helps our clients leverage technology to get their businesses moving. We solve complex business challenges that can often get companies stuck, costing them time, resources, and money. What makes us different than other custom application services is that we start with the business problem first. RDA’s experienced team takes the time to understand our clients' business needs and offers several ways to work together, including on site, field teams, and in our corporate development center. Our development services include .NET, SharePoint, business intelligence, cloud and mobile applications.http://www.rdacorp.com

Page 3: The Evolution of SharePoint Event Receivers from On-Prem to the Cloud @DogFoodCon September 29 th, 2014 Timothy Ferro

Agenda

• My Background• Overview of Traditional Event Receivers• Changes from 2007 to 2010 to 2013

– SharePoint 2007 Event Receiver Type Enumeration– SharePoint 2010 Event Receiver Type Enumeration– SharePoint 2013 Event Receiver Type Enumeration– SharePoint 2013 Remote/App Events Overview– SharePoint 2013 Remote Event Receiver Type Enumeration

• Demo• Questions• References

Page 4: The Evolution of SharePoint Event Receivers from On-Prem to the Cloud @DogFoodCon September 29 th, 2014 Timothy Ferro

My Background

• Senior SharePoint Developer / SharePoint Architect • Senior Software Engineer at RDA Corporation• Author / Speaker / Blogger / Tweeter• 7+ Years Architecting and Developing SharePoint Solutions• [email protected]• www.timferro.com• @timferro

Page 5: The Evolution of SharePoint Event Receivers from On-Prem to the Cloud @DogFoodCon September 29 th, 2014 Timothy Ferro

PublicationsBook Technical Editor: You Don’t Know JS: Scope and Closures and Types & Grammar

White Paper Author: Utilizing and Visualizing Geolocation Data for Powerful Analysis

Page 6: The Evolution of SharePoint Event Receivers from On-Prem to the Cloud @DogFoodCon September 29 th, 2014 Timothy Ferro

Overview of Traditional Event Receivers• An event receiver in Microsoft SharePoint is simply a

method that is called when a triggering action occurs on a specified SharePoint object. Triggering events include actions such as adding, updating, deleting, moving, checking in, and checking out. SharePoint objects that listen for events—that is, event receiver hosts—include objects such as site collections, sites, lists, and workflows. http://msdn.microsoft.com/en-us/library/gg749858(v=office.14).aspx

• Synchronous vs. Asynchronous Events• Binding Event Receivers• Disabling Event Receivers

Page 7: The Evolution of SharePoint Event Receivers from On-Prem to the Cloud @DogFoodCon September 29 th, 2014 Timothy Ferro

SharePoint 2007 Event Receiver Type EnumerationFieldAdding FieldAddedFieldUpdating FieldUpdatedFieldDeleting FieldDeletedSiteDeleting SiteDeletedWebDeleting WebDeletedWebMoving WebMovedItemAdding ItemAddedItemUpdating ItemUpdatedItemDeleting ItemDeletedItemCheckingIn ItemCheckedInItemCheckingOut ItemCheckedOutItemUncheckingOut ItemUncheckedOutItemAttachmentAdding ItemAttachmentAddedItemAttachmentDeleting ItemAttachmentDeletedItemFileMoving ItemFileMovedContextEvent ItemFileConvertedInvalidReceiver EmailReceivedFeatureDeactivating FeatureActivatedFeatureUninstalling FeatureInstalled

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.speventreceivertype(v=office.12).aspx

Page 8: The Evolution of SharePoint Event Receivers from On-Prem to the Cloud @DogFoodCon September 29 th, 2014 Timothy Ferro

SharePoint 2010 Event Receiver Type EnumerationFieldAdding FieldAdded ListAddingFieldUpdating FieldUpdated ListDeletingFieldDeleting FieldDeleted WebAddingSiteDeleting SiteDeleted ListAddedWebDeleting WebDeleted ListDeletedWebMoving WebMoved WebProvisionedItemAdding ItemAdded WorkflowStartingItemUpdating ItemUpdated WorkflowStartedItemDeleting ItemDeleted WorkflowPostponedItemCheckingIn ItemCheckedIn WorkflowCompletedItemCheckingOut ItemCheckedOut FeatureUpgradingItemUncheckingOut ItemUncheckedOutItemAttachmentAdding ItemAttachmentAddedItemAttachmentDeleting ItemAttachmentDeletedItemFileMoving ItemFileMovedContextEvent ItemFileConvertedInvalidReceiver EmailReceivedFeatureDeactivating FeatureActivatedFeatureUninstalling FeatureInstalled

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.speventreceivertype(v=office.14).aspx

Page 9: The Evolution of SharePoint Event Receivers from On-Prem to the Cloud @DogFoodCon September 29 th, 2014 Timothy Ferro

SharePoint 2013 Event Receiver Type EnumerationFieldAdding FieldAdded ListAdding GroupAdding GroupAdded

FieldUpdating FieldUpdated ListDeleting GroupUpdating GroupUpdated

FieldDeleting FieldDeleted WebAdding GroupDeleting GroupDeleted

SiteDeleting SiteDeleted ListAdded GroupUserAdding GroupUserAdded

WebDeleting WebDeleted ListDeleted GroupUserDeleting GroupUserDeleted

WebMoving WebMoved WebProvisioned RoleDefinitionAdding RoleDefinitionAdded

ItemAdding ItemAdded WorkflowStarting RoleDefinitionUpdating RoleDefinitionUpdated

ItemUpdating ItemUpdated WorkflowStarted RoleDefinitionDeleting RoleDefinitionDeleted

ItemDeleting ItemDeleted WorkflowPostponed RoleAssignmentAdding RoleAssignmentAdded

ItemCheckingIn ItemCheckedIn WorkflowCompleted RoleAssignmentDeleting RoleAssignmentDeleted

ItemCheckingOut ItemCheckedOut FeatureUpgrading InheritanceBreaking InheritanceBroken

ItemUncheckingOut ItemUncheckedOut InheritanceResetting InheritanceReset

ItemAttachmentAdding ItemAttachmentAdded AppInstalled EntityInstanceAdded

ItemAttachmentDeleting ItemAttachmentDeleted AppUpgraded EntityInstanceUpdated

ItemFileMoving ItemFileMoved AppUninstalling EntityInstanceDeleted

ContextEvent ItemFileConverted ItemVersionDeleting

InvalidReceiver EmailReceived ItemVersionDeleted

FeatureDeactivating FeatureActivated

FeatureUninstalling FeatureInstalled WebRestored

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.speventreceivertype(v=office.15).aspx

Page 10: The Evolution of SharePoint Event Receivers from On-Prem to the Cloud @DogFoodCon September 29 th, 2014 Timothy Ferro

SharePoint 2013 Remote/App Events Overview• App Events: Installed, Upgraded, Uninstalling• Remote Events: your cloud app can respond when a user adds, changes,

or deletes a list, a list item, or a web.• Remote event receivers and app event receivers work only with cloud

apps for SharePoint (that is, auto-hosted and provider-hosted apps). These receivers don't work with SharePoint-hosted apps for SharePoint.

http://msdn.microsoft.com/en-us/library/office/dn456315.aspx

Hosting model Support for remote event receivers

Auto-hosted Yes

Provider-hosted Yes

SharePoint-hosted No

• In SharePoint 2013, the code that runs when the event is triggered is served by a web service. […]if you register a remote event receiver, you also need to tell SharePoint which web service to invoke.

Page 11: The Evolution of SharePoint Event Receivers from On-Prem to the Cloud @DogFoodCon September 29 th, 2014 Timothy Ferro

SharePoint 2013 Remote Event Receiver Type EnumFieldAdding FieldAdded ListAdding GroupAdding GroupAdded

FieldUpdating FieldUpdated ListDeleting GroupUpdating GroupUpdated

FieldDeleting FieldDeleted WebAdding GroupDeleting GroupDeleted

SiteDeleting SiteDeleted ListAdded GroupUserAdding GroupUserAdded

WebDeleting WebDeleted ListDeleted GroupUserDeleting GroupUserDeleted

WebMoving WebMoved WebProvisioned RoleDefinitionAdding RoleDefinitionAdded

ItemAdding ItemAdded WorkflowStarting RoleDefinitionUpdating RoleDefinitionUpdated

ItemUpdating ItemUpdated WorkflowStarted RoleDefinitionDeleting RoleDefinitionDeleted

ItemDeleting ItemDeleted WorkflowPostponed RoleAssignmentAdding RoleAssignmentAdded

ItemCheckingIn ItemCheckedIn WorkflowCompleted RoleAssignmentDeleting RoleAssignmentDeleted

ItemCheckingOut ItemCheckedOut FeatureUpgrading InheritanceBreaking InheritanceBroken

ItemUncheckingOut ItemUncheckedOut InheritanceResetting InheritanceReset

ItemAttachmentAdding ItemAttachmentAdded AppInstalled EntityInstanceAdded

ItemAttachmentDeleting ItemAttachmentDeleted AppUpgraded EntityInstanceUpdated

ItemFileMoving ItemFileMoved AppUninstalling EntityInstanceDeleted

ContextEvent ItemFileConverted ItemVersionDeleting

InvalidReceiver EmailReceived ItemVersionDeleted

FeatureDeactivating FeatureActivated

FeatureUninstalling FeatureInstalled WebRestored

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.remoteapp.spremoteeventtype.aspx

Page 12: The Evolution of SharePoint Event Receivers from On-Prem to the Cloud @DogFoodCon September 29 th, 2014 Timothy Ferro

Demo• SharePoint 2013• Setting up SharePoint Event Receiver Solutions• Feature Activation Code• Event Receiver Code• Event Receiver Examples

Page 13: The Evolution of SharePoint Event Receivers from On-Prem to the Cloud @DogFoodCon September 29 th, 2014 Timothy Ferro

References / Questions / Evaluations• http://www.rdacorp.com/2014/06/sharepoint-2013-new-event-receivers-nutshell/• http://www.timferro.com/wordpress/archives/737• http

://msdn.microsoft.com/en-us/library/microsoft.sharepoint.speventreceivertype(v=office.15).aspx

• http://msdn.microsoft.com/en-us/library/office/jj220048.aspx• http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spitemeventreceiver.

aspx• http://msdn.microsoft.com/en-us/library/office/dn456315.aspx• http://www.learningsharepoint.com/2012/12/27/create-a-groupuseradded-eventrec

eiverspsecurityeventreceiver-in-sharepoint-2013/• [email protected]• www.timferro.com• @timferro