Microsoft SharePoint Foundation offers a highly structured server-side object model that makes it easy to access objects that represent the various aspects of a SharePoint Web site. From higher-level objects, you can drill down through the object hierarchy to obtain the object that contains the members you need to use in your code.
The following diagram shows the SharePoint Foundation server
architecture in relation to the collections and objects of the Microsoft.SharePoint.Administration namespace.
- The SPFarm object is the highest object within the SharePoint
Foundation object model hierarchy. The Servers property gets a collection representing all the servers
in the deployment, and the Services property gets a collection representing all the
services.
- Each SPServer object represents a physical server computer. The ServiceInstances property provides access to the set of individual
service instances that run on the individual computer.
- Each SPService object represents a logical service installed in the
server farm. Derived types of the SPService class include, for example, objects for Windows
services, such as the timer service, search, the database service, etc.
and also objects for Web services, such as the basic content publishing
Web service which supports the Web applications.
- An SPWebService object provides access to configuration settings for a
specific logical service or application. The WebApplications property gets the collection of Web applications that
run the service.
- If the service implements the Service Application
Framework of SharePoint Foundation, then it can be split into
multiple configured farm-scoped instantiations (CFSIs). Each of these
provides the functionality of the service but each has its own individual
permission and provisioning settings.
- Each instance of a service, or a CFSI, that is running
on a specific server is represented by an SPServiceInstance object.
- An SPDatabaseServiceInstance object represents a single instance of a database
service running on the database server computer. TheSPDatabaseServiceInstance class derives from the SPServiceInstance class and thus inherits the Service property, which provides access to the service or
application that the instance implements. The Databases property gets the collection of content databases used
in the service.
- Each SPWebApplication object represents a Web application hosted in an
Internet Information Services (IIS) Web site. The SPWebApplication object provides access to credentials and other
farm-wide application settings. 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. The Sitesproperty
gets the collection of site collections for which the content database
stores data, and the WebApplication property gets the parent Web application.
- An SPSiteCollection object represents the collection of site collections
within the Web application.
The following diagram
shows the SharePoint Foundation site architecture in relation to the
collections and objects of the Microsoft.SharePoint namespace.
- Each SPSiteobject,
despite its singular name, represents a set of logically related SPWeb objects (see below). Such a set is commonly called a
"site collection," but SPSite is not a standard Microsoft .NET collection class, in
contrast to SPWebCollection.
Rather, it has members that can be used to manage the site collection. The AllWebs property provides access to the SPWebCollection object that represents the collection of all Web sites
within the site collection, including the top-level site. The SPSite.OpenWebmethod
of the SPSite class returns a specific Web site.
- 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 Webs property returns an SPWebCollection object that represents all the subsites of a specified
site, and the Lists property returns an 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 GetItems method can be used to perform queries that return
specific items. The Fields property returns an 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.
No comments:
Post a Comment