Server and website architecture: Object Model Overview

Source: Internet
Author: User

Microsoft SharePoint Foundation provides a highly structured server-side object model that allows you to easily access objects that represent all aspects of a Sharepoint website. You can start from an object with a higher level and step through the object hierarchy to obtainCode.

Entry Point

Based on the custom application to be createdProgramType or solution type. You can use different entry points to enter the object model to obtain the appropriate object from which you want to start operations. For example, if you want to customize the management and configuration of the deployment, you can use the static contentservice attribute to return the current web service object and its web application set. To modify the settings in the Web application management, use the administrationservice attribute. The Collection class derived from the Microsoft. Sharepoint. Administration. sppersistedobjectcollection <t> class inherits the getvalue method. You can use this method to return specific objects from the collection.

Note

If you want to create a Web part, custom web service, or web application that is used with a website set, a single website, or a list, you can use Microsoft. sharepoint. the spcontext class member obtains the current website set, website, or list. After you create a web application in the/_ layouts virtual directory, the function of this application can be used for all websites on the Web server. In addition to the HTTP context (for example, in a console application or a Windows application), use the spsite constructor to obtain a specific website set and access each object in the website set. For more information, see get references to websites, web applications, and other key objects.

Server Architecture

Displays the SharePoint Foundation server architecture associated with the collection and objects of the Microsoft. Sharepoint. Administration namespace.

  1. The spfarm object is at the highest level in the SharePoint Foundation object model hierarchy. Obtaining the servers attribute indicates the set of all servers in the deployment. The collection of all services.

  2. Each spserver object represents a physical server computer. The serviceinstances attribute allows you to access a single service instance set running on a single computer.

  3. Each spservice object represents a logical service installed on the server farm. The derived types of the spservice class include the objects used for Windows Services (such as scheduled services, search, and database services), and the objects used for web services (such as the basic content that supports Web applications to publish Web Services).

  4. The spwebservice object provides access permissions for configuration settings of specific logical services or applications. Obtain the set of web applications that run the service.

  5. If this Service implements the service application framework of SharePoint foundation, you can split it into multiple instances (CFSI) within the configured server farm range ). Each instance can provide this service, but each instance has its own permissions and settings.

  6. Each service instance or CFSI running on a specific server is represented by a spserviceinstance object.

  7. The spdatabaseserviceinstance object indicates a single instance of the Database Service Running on the database server computer. The spdatabaseserviceinstance class is derived from the spserviceinstance class, so it inherits the service attribute, which provides access permissions to the services or applications implemented by the instance. The databases attribute gets the set of content Databases Used in the service.

  8. Each spwebapplication object represents a web application hosted on the Internet Information Services (IIS) website. The spwebapplication object provides access permissions for creden。 and other server farm applications. The sites attribute obtains the set of website sets in Web applications, and the contentdatabases attribute obtains the set of content databases used in Web applications.

  9. The spcontentdatabase object inherits from the spdatabase class, indicating the database that contains user data of Web applications. The sites attribute obtains the set of websites where the content database stores its data. The webapplication attribute obtains the parent web application.

  10. The spsitecollection object is a collection of website sets in a web application.

Website architecture

Displays the SharePoint Foundation website architecture associated with the collection and objects of the Microsoft. SharePoint namespace.

    1. Each spsite object represents a group of logically associated spweb objects (see the following section), even though its name is in the singular form. This type of group is usually called "website set", but unlike spwebcollection, spsite is not a standard Microsoft. NET collection class. These groups contain members that can be used to manage a website set. The allwebs attribute provides access permissions for objects in the spwebcollection collection that represents the collection of all websites (including the primary websites) in the website. The spsite. openweb method of the spsite class returns a specific website.

    2. each website set contains any number of spweb objects, each of which can be used to manage websites (including their templates and themes) and access the files and folder members on the website. The webs attribute returns a spwebcollection object indicating all sub-websites on the specified website; the lists attribute returns a splistcollection object indicating all lists on the website.

    3. Each splist object contains members used to manage items in the list or access list. The getitems method can be used to execute queries that return specific projects. The fields attribute returns a spfieldcollection object that represents all fields or columns in the list. The items attribute returns a splistitemcollection object that represents all items or rows in the list.

    4. Each spfield object has members that contain field settings.

    5. Each splistitem object represents a row in the list.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.