I am having requirement create an event receiver for SharePoint 2010 Lists. I was working with choosing the correct approach.

While reading I came across Using the Object Model vs. Using Solutions.

I am confused in using Object Model and using Solutions.

I am not getting clear idea to differentiate between Object Model and Solution.

If any one have gone through such requirement or having some articles then please share.


To understand this in simple terms.

object model

Here you are creating a class library which has event receiver code. After development you copy the dll to each sever in the farm and install it into gac. Then you run another code (or command) to bind the event receiver inside the dll to a SharePoint list.


Here you create a SharePoint project in Visual Studio. You add a Event Receiver module. You add a feature to deploy the event receiver. The output will be a WSP file. You copy the WSP to one of the server in your farm. You install the WSP and Deploy. Now SharePoint will automatically install respective files across servers in the farm.

From this you can clearly see that Solution approach is the best way to go.

  • Now I am totally able to relate the things. I guess this was the simple and up to the point explanation what you have given. Sep 1 '16 at 13:22

I think that the terminology here is a bit confusing. The article you linked to describes two ways of deploying managed code - either manually, or through a solution. But I think calling the manual deployment method "working with the object model" is misleading.

No matter which way you decide to deploy, your event receiver is going to be written in C# code, and therefore you will be using the server object model

In both cases, your code will be compiled into a .dll. It's just that with a solution deployment, the .dll will be packaged inside the WSP file, and SharePoint will automatically make sure the .dll is installed where it needs to be (which may be different places depending on if it is a Farm solution or a Sandbox solution). If you are doing a manual installation, you have no package, and you have to make sure the .dll is installed everywhere it needs to be.

But still, in both cases, you are writing managed server-side code that interacts with the server object model.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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