You are on page 1of 6

Conceptual Overview of SharePoint Foundation

9 out of 9 rated this helpful - Rate this topic Published: May 2010 Microsoft SharePoint Foundation is an application that is built on top of Internet Information Services (IIS) and the Microsoft ASP.NET Framework. A set of servers that run the various components of SharePoint Foundation is called a server farm. A server farm can contain multiple front-end web servers and multiple Microsoft SQL Server database servers. Each farm has its own configuration database on the database server. The configuration database contains information about the front-end web servers in a farm and administrators of the farm. In SharePoint Foundation, all the content, including user information, is stored in acontent database. Every server farm can have multiple content databases. For more information about SharePoint Foundation architecture, see Server and Site Architecture: Object Model Overview. A site collection is a hierarchical set, or collection, of sites. A site collection includes only one top-level site but can contain multiple child sites within. Sites in a site collection share common features, such as permissions, galleries, and Web Parts. Each site collection has a site collection administrator and unique permissions from other site collections. This allows a decentralized approach to server farm administration. Within a site collection, a site is used to store content in the form of pages, libraries, and lists. A site can be secured so that only specified users have access to the content of that site. For more information about sites and site collections, see Building Block: Websites and Site Collections. Within each site, you can provision lists, libraries, and pages. A list is the basic type of object inside SharePoint Foundation. There are different kinds of lists. Some of the list types include announcement lists, task lists, and event lists. Lists contain columns of information that are often referred to as fields. You can define custom columns to suit the kind of data that you want to store in a list. And you can use columns to sort, filter, and group list items. A document library is a specialized kind of list that is used to store files and folders. The columns in a document library are used to store metadata about a document. For more information about lists and document libraries, see Building Block: Lists and Document Libraries. SharePoint Foundation also provides an extensibility framework that includes deployment. SharePoint Foundation provides multiple object models that you can use for different kinds of development. These object models include the server, client, ECMAScript (JavaScript, JScript), and web services. When you build an application, you can deploy it by using a combination of a solution package and a Feature. Features enable you to deploy specific functionality that can be scoped to different levels. A Feature can contain templates, pages, lists, event handlers, and other customizations. A solution package (.wsp file) lets you package and deploy applications that are built on SharePoint Foundation. A solution package contains the Features and any related resources necessary for the application. Because SharePoint Foundation is built on top of ASP.NET, it carries familiar concepts from that environment, including Web Parts, master pages, navigation controls, and mobile adapters. For more information about similarities to ASP.NET, see Glide Path for ASP.NET Developers.

Server and Site Architecture: Object Model Overview


Other Versions

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.

Entry Points
Depending on the type of custom application or solution that you are creating, you use different entry points into the object model to obtain the appropriate object from which to start. For example, if you are customizing administration and configuration of a deployment, you can use the static ContentService property to return the current Web service object and its collection of Web applications. To modify settings in the administrative Web application, instead use theAdministrationService property. Collection classes that derive from the Microsoft.SharePoint.Administration.SPPersistedObjectCollection<T> class inherit aGetValue method that you can use to return a specific object from a collection.

Note If you are creating a Web Part, custom Web service, or Web application to work with site collections, individual sites, or lists, you can use members of theMicrosoft.SharePoint.SPContext class to obtain the current site collection, Web site, or list. When you create a Web application in the /_layouts virtual directory, its functionality becomes available to all sites on the Web server. Outside of an HTTP context, such as in a console application or a Windows application, use a constructor of the SPSite class to obtain a specific site collection and to reach various objects within the collection. For more information, see Getting References to Sites, Web Applications, and Other Key Objects.

Server Architecture
The following diagram shows the SharePoint Foundation server architecture in relation to the collections and objects of the Microsoft.SharePoint.Administrationnamespace.

1. 2. 3. 4. 5. 6. 7. 8. 9.

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.

10. An SPSiteCollection object represents the collection of site collections within the Web application.
Site Architecture
The following diagram shows the SharePoint Foundation site architecture in relation to the collections and objects of the Microsoft.SharePoint namespace.

1.

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.

2. 3. 4. 5.

Building Block: Lists and Document Libraries


1 out of 3 rated this helpful - Rate this topic Published: May 2010 Microsoft SharePoint Foundation 2010 offers several APIs that you can use to work with lists. The following managed object models provide types and members that allow you to modify list properties and create and manage list templates and list items:

For code that operates on the server, the Microsoft.SharePoint namespace provides the core classes that represent a list. TheMicrosoft.SharePoint.Deployment namespace provides an API for migrating content between site collections. For managed code that operates in the context of client-side Microsoft .NET 3.5 applications or Silverlight applications, the Microsoft.SharePoint.Clientnamespace provides a subset of the types and members available in the server object model. For script that operates in the browser, the ECMAScript (JavaScript, JScript) object model of the SP namespace provides a subset of the types and members available in the server object model. The Lists Web service provides methods for working remotely with lists.

You can use the SaveAsTemplate(String, String, String, Boolean) method in the server-side object model to save an existing SharePoint Foundation list as a list template, or use the SPListTemplate class and its collection class to manage list templates. The SPListTemplate class represents both custom list templates, which you create through the SaveAsTemplate(String, String, String, Boolean) method or save through the UI, and list definitions, which you install and activate as a Feature in the %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\FEATURES directory. A list schema has both a base type and a list template type. The SPBaseType enumeration identifies the following list base types:

Generic list type for most lists Document library Discussion board Survey Issue Unspecified base type.

The SPListTemplateType enumeration identifies the default list template types in SharePoint Foundation, each of which is associated with a single list base type definition. The SPList class provides access to list properties common to all lists, but it is also possible for list template types to derive from a list base type. For example, you can cast a list object that represents a document library as an SPDocumentLibrary object to access properties that are specific to document libraries. Microsoft Microsoft Business Connectivity Services (BCS) provides APIs for working with external lists. For information about Business Connectivity Services, seeBuilding Block: External Content Types and External Lists.

Object Model for Lists and Document Libraries


The following classes in the server and client object models can be used to work with lists, list templates, and list items:

SPList Represents a list on a SharePoint Web site. An efficient way to return a specific list is through the GetList method of SPWeb or SPListCollection. Client object model: List (JavaScript: List)

SPListDataSource Provides information about an external list.

Client object model ListDataSource (JavaScript: ListDataSource)

SPListEventProperties Provides properties for SharePoint list events. SPListEventReceiver Provides methods to trap events that occur for lists.

SPListItem Represents an item or row in a list. An efficient way to return a list item or a SPListItemCollection is through a GetItem* method of SPList orSPWeb. Client object model: ListItem (JavaScript: ListItem)

SPListItemVersion Represents a version of a list item.

SPListTemplate Represents a list definition or a list template, which defines the fields and views for a list. List definitions are contained in files within the %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\FEATURES directory, but list templates are created through the user interface or through the object model when a list is saved as a template. Client object model: ListTemplate (JavaScript: ListTemplate)

SPListTemplateType An enumeration that specifies the type of a list definition or a list template.

Client object model: ListTemplateType (JavaScript: ListTemplateType)

SPBaseType An enumeration that specifies the base type for a list.

Client object model: BaseType (JavaScript: BaseType)

SPDocTemplate Represents a document template used in a document library. SPDocumentLibrary Represents a document library in SharePoint Foundation.

For information about working with lists in the server object model, see Working with List Objects and Collections and programming tasks included in Basic Object Model Tasks in SharePoint 2010. For information about working with lists in the client object models, see Data Retrieval Overview and programming tasks in Common Programming Tasks in the Managed Client Object Model.

XML Used for Lists and Document Libraries


A list definition is activated as a SharePoint Foundation Feature and has a Schema.xml file that contains the schema, although much of the view definition is provided through XSLT in the %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\LAYOUTS\XSL directory. List is the top-level element in the list schema, but the Configuration element in a site definition schema also contains a List element to include a specific list as part of Web sites that are created through the site definition. The List Instance Feature allows you to specify default data with which to provision a list type. For information about how to use Features, see Using Features in SharePoint Foundation. For an example that shows how to create a list definition Feature, see How to: Create a Custom List Definition.

Areas Related to Lists and Document Libraries


Building Block: Files and Documents Building Block: Alerts Building Block: Columns and Field Types Building Block: SharePoint 2010 Content Types Building Block: Event Handling Building Block: External Content Types and External Lists Building Block: Features Building Block: Queries and Views

More Information about Lists and Document Libraries


SharePoint List Data Model How to: Create a Custom List Definition

How to: Add a Document Template, File Type, and Editing Application to a Site Definition How to: Create a Custom Action Specific to a List How to: Create an Event Handler Feature Common Programming Tasks in the Managed Client Object Model Basic Object Model Tasks in SharePoint 2010 Web Templates Site Definitions and Configurations