Thursday, November 26, 2015

Process architecture - creating a new list in SharePoint


Process of creating a new list in SharePoint



Example : creation of a new announcements list involves the following actions by the server:
  1. The browser posts a request to owssvr.dll on the server to create the list, specifying the title and description of the list. The POST specifies the key value pair, Cmd=NewList, along with such parameters as ServerTemplate, which specifies a number identifying which list template to instantiate (for example, 104 indicates the Announcements list).
  2. The server opens ONET.XML in the /Program Files/Common Files/Microsoft Shared/web server extensions/50/Templates/1033/xml folder and looks for the list template corresponding to the number specified in step 1. When it finds the template, it knows the location in the Layouts folder where the files for that template are stored. For example, a template definition in ONET.XML might look like the following:
<ListTemplate Name="announce" DisplayName="Announcements" Type="104"
  BaseType="0" Default="TRUE" OnQuickLaunch="FALSE" SecurityBits="111"
  Description="An announcement list makes it easy for team members to post
  news and information for the rest of the team to see."
Image="_layouts/images/itann.gif"/>

This definition tells the server that the corresponding list template is stored in the Announce directory of the /Program Files/.../web server extensions folder.

  1. The server opens a second file in the /Program Files/.../web server extensions area, in this case SCHEMA.XML of the Announce folder. This file includes the set of fields that constitute the list, which is combined with a set of universal built-in fields defined in ONET.XML (such as for ID number, author, editor, and last modified) to construct a CREATE TABLE statement that is responsible for creating the actual database table.
  2. A directory is created for the new list in the /wwwroot/Lists folder, and the HTML site pages are copied from the setup area (/Program Files/Common Files/Microsoft Shared/web server extensions/50/1033/Templates/Layouts folder) to the new directory. The folder metadata for the directory (in the .fp_folder_info file of the /_vti_cnf subfolder) is initialized with the internal name of the list, the type of list, and the display name of the list.
  3. The server creates a record in the List of Lists table for the new list, filling in all the columns based on the information specified in the NewListrequest and the instructions in SCHEMA.XML. The tp_RootFolder column contains the URL ID of the directory created in step 4, and the tp_Fields column contains field definitions that are drawn from both ONET.XML and SCHEMA.XML. The field definitions include display patterns that define computed fields, such as the title links for items displayed in AllItems.htm. (The LinkTitle field type, a field defined in ONET.XML, surrounds the values from a table's Title field with <A> tags to produce title links.)
  4. In SCHEMA.XML, the server locates the Views and Forms sections and copies each view and form definition into the tp_View column of the Views table. Rows are created for each of the list's HTML site pages (AllItems.htm, DispForm.htm, EditForm.htm, and NewForm.htm), and the View column contains the schemas for rendering each of these pages. (The site pages contain FrontPage components that expand in the browser to pull in these view schemas from the database.)

No comments:

Post a Comment