Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

http://msdn.microsoft.com/en-us/library/ms453149.aspx says

To create the event handler 1. Start Microsoft Visual Studio 2010. 2. On the File menu, point to New, and then click Project. 3. In Project Types, under Visual Basic or C#, select Event Receiver. ...

So wait, is there a difference between an event receiver and an event handler? Or is it just that what is commonly referred to as an event handler in most environments is for some reason called an event receiver in SharePoint?

For example in this link - http://blog.sharedove.com/adisjugo/index.php/2009/03/12/develop-and-deploy-a-sharepoint-event-receiver-from-the-scratch/ - the author uses "event handler" throughout, except when referencing the SharePoint class names. Googling for "event receiver" turns up mostly SharePoint references, with a few Microsoft Office hits here and there.

If anyone has the definitive word on this, I'd appreciate it.

share|improve this question
1  
Documentation refers to "event handlers" but code uses "event receivers". We have more tags using the "event handlers" term here, therefore I've made "event receiver" a synonym of event-handlers on this site. –  Alex Angas Sep 1 '11 at 22:36
add comment

3 Answers

Both mean the same; handle the Event or receive the event.

share|improve this answer
add comment

Going back to WSS2/SP2003 it was Event Handler. With WSS3/SP2007 it changed to Event Receiver...there is even a setting on the Web App in CA that let's you enable/disable support for backwards-compatible event handling.

In the context of 2010, "event handler" or "event receiver" is one in the same.

share|improve this answer
add comment

An Event Receiver is managed code that responds to SharePoint Foundation events whenever specific triggering actions occur - which is same as Event Handler.

The term "Event Receiver" is specific to context of SharePoint where as "Event handler" is a general term used for any subroutine that handles inputs received in a program. Event handlers are a central concept in event-driven programming.

share|improve this answer
1  
In addition to this, Event Handlers are usually asynchronous delegated blocks of code, whereas SharePoint Event Receivers can be asynchronous or synchronous. –  James Love Nov 27 '11 at 19:29
    
Event handlers are usually synchronous, no? –  Paul Lucas Nov 27 '11 at 22:20
1  
An 'Event handler' in context of SharePoint is named as 'Event Receiver'-both are same. Event Handler\Receiver can be asynchronous or synchronous. –  Amit Kumawat Nov 28 '11 at 6:20
    
Imagine you have a PDF file on your desktop, It can be represented by a 'File' object.When you upload the same file to a document library in SharePoint, It becomes 'SPFile'. Still that file remains a file!...only attached contextual information differs.Same applies to 'Event Receiver' and 'Event handler' –  Amit Kumawat Nov 28 '11 at 6:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.