subject: Server And Site Architecture: Object Model Overview Sharepoint [print this page] The Outsource SharePoint Development gives you a very much ordered server-side object model which makes it very easy in accessing objects that stand for the various features of the SharePoint website. Starting from a higher-level object, one could be able to drill down via the object hierarchy in order to get the object that have the members you may want to use during coding.
Understanding the Object Model
It depends largely on the kind of solution or custom application you intend creating; one could make use of various methods to get into an object model in order to get the correct object from which to begin. For instance, you are designing the configuration and administration of a deployment; one could make use of the static ContentService feature to return the present web oriented object as well as its set of web application. In order to amend the web application administrative setting, as an alternative you could use the AdministrationService property. The selection of classes that emerge from the MicrosoftSharePointAdministrationSPPersistedObjectCollection(Of T) class take over the GetValue method one could make use of in returning the precise object from a collection.
Take Note:
If youre creating the Web Part, web application or custom web service that will work with the site collections, lists or individual sites, you could make use of the members of the Microsoft.SharePoint.SPContext class for you to get the present site collection, list or web site. When creating the web application in a layouts virtual directory, its usefulness becomes accessible to every websites on web server. At the outer surface of the HTTP context, for example in the windows application or console application, you could make use of a constructor of a SPSite class to get a precise site collection and also to reach several objects that is within the collection. We can get more details about this in Getting Reference to Web Applications, Sites and Various Key Objects.
Server Architecture
Below is an explanation of the Outsource SharePoint Development site architecture with respect to the objects and collections of the Microsoft.SharePoint namespace.
Despite the single name, each SPSiteobject represents a collection of logically connected SPWeb objects. This collection is usually referred to as site collection, though the SPSite isnt a standard Mircrosoft.NET collection class, contrary to SPWebCollection. Instead, it has some members that could be made used to control the site collection. It is good to know that the AllWebs property grants entry to the SPWebCollection object that stands for the collection of every websites in the site collection. This includes the top level website. The SPSite classs of the SPSite.OpenWeb method returns a precise Web site.
Each one of the site collection consist of every number of the SPWeb objects, also each one object has members that could be used to control the site. This includes its theme and template and to access the folders and files on the site. Webs property usually returns SPWebCollection object that stands for every sub sites of a prcised site, as well as the Lists property returns SPListCollection object that stands for every list in the sites.
Each one of the SPList object has lots of members that are used to control the access items or list in the list. You can make use of the GetItems method to carry out queries that return precise items. The Fields property usually returns a SPFieldCollection object that stands for the columns, fields, in the list as well as the Items property returns a SPListItemCollection object that stands for every item, rows, in the list.
Each one of the SPField object has members that have the settings for the field.
Each one of the SPListItem object stands for a single row in the list.