Explained: Feature Event Receiver

exclamation-amongst-question-marks.jpg

There are some things that developers will either hear for the first time or, more often, will keep hearing without knowing precisely what they are. I will use the “what is” tag in order to explain what some of these concepts are.

1. feature event receiver:
Although it does remind us of the generic event receivers, a feature event receiver is a very specific piece of code. In essense, after the introduction of Microsoft Office 2007, a feature event receiver is a server-side code routine that executes as part of the four key events in the lifetime of a feature; those four events are: installation, activation, deactivation and removal.

According to the MSDN library:
Real World Example: A developer creating a Feature determines that it must make some calls to the object model when activated, and perform some cleanup when deactivated. He creates a custom Feature event receiver class and includes a reference to it in the Feature definition.
Technical Details: You compile Feature event receivers into assemblies that are associated with the definition of a Feature. If a Feature receiver is associated with that Feature, when the Feature goes through one of its four lifecycle events it is called with additional information relating to the scope and target of that event.

For more information, click the link above to visit the MSDN library.

Powered by Zoundry Raven

Technorati : ,
Del.icio.us : ,
Zooomr : ,
Flickr : ,

MGR: the Intelogist

About MGR: the Intelogist

SharePoint Server developer, turned Sitefinity developer, turned Angular developer, turned SharePoint Online consultant, turned Unily consultant, turned O365 consultant... Never a dull moment!

One thought on “Explained: Feature Event Receiver

  1. […] If the current project is a feature event receiver, the developer should not choose to have Visual Studio activate the feature. Instead, the developer […]

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

This site uses Akismet to reduce spam. Learn how your comment data is processed.