Thursday, June 5, 2008

Difference between Synchronous and Asynchronous Events

The primary differences between Sync & Async event handlers are :

1) Synch Eve Handlers will work before the event is completed while AEH will fire after the event is completed.
2) SEH are mostly used to stop the event from completion in order to validate few things. It means you can cancel the event using SEH while it is not possible to cancel the event from AEH.
3) SEH methods has their method names ending with -ing while AEH method names will end with -ed. e.g. ItemAdding, ItemUpdating are SEH while ItemAdded, ItemUpdated are AEH methods.
4) SEH can be used to Add/Modify the values of list fields while using AEH its not possible as it fires after the completion of event.

3 comments:

Anonymous said...

Hi,

it's a clerar and simplest and best view of an Event Handler

Anonymous said...

hi, its was realy simple... cheers..

Unknown said...

nice and very clear




Share your SharePoint Experiences with us...
As good as the SharePointKings is, we want to make it even better. One of our most valuable sources of input for our Blog Posts comes from ever enthusiastic Visitors/Readers. We welcome every Visitor/Reader to contribute their experiences with SharePoint. It may be in the form of a code stub, snippet, any tips and trick or any crazy thing you have tried with SharePoint.
Send your Articles to sharepointkings@gmail.com with your Profile Summary. We will Post them. The idea is to act as a bridge between you Readers!!!

If anyone would like to have their advertisement posted on this blog, please send us the requirement details to sharepointkings@gmail.com