Sunday, September 1, 2013

SharePoint 2013 - Server Object Model

As you might already know that the SharePoint 2013 is built upon .Net 4.5 framework and Asp.Net. Therefore, the SharePoint infrastructure provides a rich .Net object model for developing solutions using compatible server side language like (C#, VB.NET etc). This Server Object Model comprises a set of namespaces and classes which must run on a SharePoint server because this is the only server on which the Server Object Model runs; it has some dependencies that are satisfied only on servers in a SharePoint farm.

Startup Environment
  • In Visual Studio, the Target Framework will be set to “.NET Framework 4.5” by default. 
  • Also, Platform Target setting in the Build configuration tab of the project will be set to “Any CPU” by default. Microsoft SharePoint 2013 works on 64-bit machines only.
  • The "Microsoft.SharePoint.dll" is the main server object model assembly which comprises of  the following 2 important namespace.
    • "Microsoft.SharePoint" - Consists of classes and members for developing solution in a top level SiteCollection, its subsites or lists (eg: SPSite, SPWeb etc).
    • "Microsoft.SharePoint.Administration" - Consists of classes and members for developing solutions at an admistrative level. (eg: SPFarm, SPServer etc)
  • When you create a SharePoint project in Visual Studio 2012, the "Microsoft.SharePoint.dll" assembly is automatically referenced.
  • On the other hand, for windows Console\WinForm applications, you need to reference "Microsoft.SharePoint.dll" explicitly. You can find it, along with many of the other assemblies, in the SharePoint15_Root\ISAPI folder.
Server Architecture
The following figure gives you a clear idea about the SharePoint Server Architecture with reference to "Microsoft.SharePoint.Administration" namespace.

From the above figure you can summarize the following point:
  • The "SPFarm" object is the highest object within the SharePoint Foundation object model hierarchy.
  • Each "SPServer" object represents a physical server computer. 
  • Each "SPService" object represents a logical service installed in the server farm.The WebApplications property gets the collection of Web applications that run the service.
  • An "SPWebService" object provides access to configuration settings for a specific logical service or application
  • Each "SPWebApplication" object represents a Web application hosted in an Internet Information Services (IIS) Web site. The Sites property gets the collection of site collections within the Web application, and the ContentDatabases property gets the collection of content databases used in the Web application.
  • The Sites property gets the collection of site collections within the Web application, and the ContentDatabases property gets the collection of content databases used in the Web application.
  • An "SPContentDatabase" object inherits from the "SPDatabase" class and represents a database that contains user data for a Web application.
Site Architecture
The following figure will give you a better idea about the SharePoint Site Collection Architecture with reference to "Microsoft.SharePoint" namespace.

From the above figure you can easily summarize the following points:
  • The "SPSite" object represents a Site Collection. 
  • Each site collection includes any number of "SPWeb" objects, and each object has members that can be used to manage a site, including its template and theme, as well as to access files and folders on the site.
  • The "SPListCollection" object that represents all the lists in the site.
  • Each "SPList" object has members that are used to manage the list or access items in the list. 
  • The "SPFieldCollection" object that represents all the fields, or columns, in the list, and the Items property returns an "SPListItemCollection" object that represents all the items, or rows, in the list.
  • Each "SPField" object has members that contain settings for the field.
  • Each "SPListItem" object represents a single row in the list.
This is just a basic overview of overall Server Object Model architecture which is very much similar to SP 2007 and SP 2010. 


  1. It is really a great work and the way in which u r sharing the knowledge is excellent.
    Thanks for helping me to understand basic concepts. As a beginner in Dot Net programming your post help me a lot.Thanks for your informative article. Dot Net Training in chennai | Dot Net Training in velachery

  2. Given so much information in it. its very useful .perfect explanation about Dot net framework.Thanks for your valuable information. dot net training in velachery | dot net training in chennai

  3. Hi Neal, your stuffs are not accessible kindly check.
    SP2013 links are not working

    1. Kindly let me know the links that are not accessible. I will correct it. Thanks for pointing out!