Event receivers are small code-based functions that happen as a reaction to certain triggers. Usually atomic in nature, as opposed to workflows which usually contain many steps, event receivers are easy to build and great at handling trivial tasks, such as validating input, performing code execution on feature activation and deactivation, prevent accidental deletion of objects, and so on.
There’s already a rich list of events to which such event receivers may react. In SharePoint 2013, though, this list grows to include events related to group, permissions, and role management.
The full list of new events, as quoted from the protocol documentation, is:
ItemVersionDeleting, GroupAdding, GroupUpdating, GroupDeleting, GroupUserAdding, GroupUserDeleting, RoleDefinitionAdding, RoleDefinitionUpdating, RoleDefinitionDeleting, RoleAssignmentAdding, RoleAssignmentDeleting, InheritanceBreaking, InheritanceRestoring, ItemVersionDeleted, GroupAdded, GroupUpdated, GroupDeleted, GroupUserAdded, GroupUserDeleted, RoleDefinitionAdded, RoleDefinitionUpdated, RoleDefinitionDeleted, RoleAssignmentAdded, RoleAssignmentDeleted, InheritanceBroken, and InheritanceRestored.
I’m a huge fan of behavior development in SharePoint, the art of making your data of objects behave as a result of some action, and the event receiver model is a huge part of that scene. I’m sure that these new events will prove valuable in a range of scenarios or to third-party vendors who may want to develop solutions to manage groups, permissions, and roles.
Note: This article is part of the SharePoint 2013 Information Weekend, so it is shorter than regular articles. Check back with my blog or follow me @furuknap during the weekend of July 13-15 2012 for lots of SharePoint 2013 information
Found this article valuable? Want to show your appreciation? Here are some options:
a) Click on the banners anywhere on the site to visit my blog's sponsors. They are all hand-picked and are selected based on providing great products and services to the SharePoint community.
b) Donate Bitcoins! I love Bitcoins, and you can donate if you'd like by clicking the button below.
c) Spread the word! Below, you should find links to sharing this article on your favorite social media sites. I'm an attention junkie, so sharing is caring in my book!