Tuesday, August 2, 2011

SharePoint: Site Columns and Content Types

There are various posts on the internet describing the site columns and content types. In this post I am co-relating these with concepts of objects and classes. This will help the developer visualize these concepts differently.

Content and Object

Object has data. Class provides the set of attributes to detail the object instances.

Content is data. Content has two categories: Structured and Unstructured.

Content comprises of documents and list items. Content does not include list or library itself. List or library helps user to organize the content.

Structured content is the one which separates its storage from its display. e.g. List Items can be sorted/filtered and viewed in List web part or data row in a SQL data table.

Unstructured content is the one which cannot be viewed separately the format in which they are stored. e.g. Word document cannot be viewed without the MS Office Word.

Content type provides the set of attributes to define the metadata about content. The attributes are provided in the form of columns/fields in the list or at the site level.

Site Column

When the column is defined at site level, it is a site column. The site column is reusable across all lists and libraries in the site.

This is very similar to have property declared in an interface and will be available across all objects implementing the interface.

Content Type

Content type is a set of site columns. The site column helps in describing the content. The content type can be used across the lists and libraries in the site.

This is just like a complex data type. The data types/ classes has properties to describe the object.