INTRODUCING REMOTE EVENT RECEIVERS

Traditionally, event receivers in SharePoint have been used for a wide range of purposes in business solutions, from sending out email or spawning announcement notifications, to data validation, to canceling a current user action and redirecting him to another action. Event receivers are often used simply for logging or tracking documents in a library for reporting purposes. The new remote event receivers take nothing away from the multiplicity of ways developers can employ them. But more importantly they comply with the objectives of the new app model to move the execution of developer code outside of SharePoint and provide a consistent programming and run-time experience on-premises and across SharePoint Online. Because the remote event receivers run off-box from SharePoint, you do not need to install .dlls for event receivers on the SharePoint server. Also, unlike the SharePoint Online sandbox environment, your event receiver is no longer required to complete within 30 seconds and you can now call out to as many external services as needed to support the work required for an event to logically be completed.

However, keep in mind that event receivers were not intended to be depended upon as a mechanism to build a transactional system. These are not wrapped in a transaction framework of, say, a begin and an end commit. So use them wisely and be careful to try not to coerce them into high-value, mission-critical, transactional scenarios they were ...

Get Beginning SharePoint 2013 Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.