<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Brian Wilson : list definition</title><link>http://blogs.msdn.com/brianwilson/archive/tags/list+definition/default.aspx</link><description>Tags: list definition</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>List Definitions versus List Templates and deciding on the correct customization approach</title><link>http://blogs.msdn.com/brianwilson/archive/2008/07/13/list-definitions-versus-list-templates-and-deciding-on-the-correct-customization-approach.aspx</link><pubDate>Sun, 13 Jul 2008 21:18:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8729197</guid><dc:creator>Brian Wilson</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/brianwilson/comments/8729197.aspx</comments><wfw:commentRss>http://blogs.msdn.com/brianwilson/commentrss.aspx?PostID=8729197</wfw:commentRss><description>&lt;H2 style="MARGIN: 12pt 0cm 6pt"&gt;&lt;A class="" name=_Toc190052185&gt;&lt;/A&gt;&lt;FONT color=#333333&gt;List Definitions&lt;/FONT&gt;&lt;/H2&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt 11.35pt; TEXT-ALIGN: justify"&gt;A list template Feature includes a Schema.xml file that serves as the base file for a list definition. The List element is the root element of a Schema.xml file, which contains default view definitions, definitions for special fields used in the list, the toolbar definition for list views, content type declarations, and other metadata for the list.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt 11.35pt; TEXT-ALIGN: justify"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt 11.35pt; TEXT-ALIGN: justify"&gt;A list definition includes a Feature.xml Files file, an element manifest file (see List Template Files), and a Schema.xml file within a Feature folder (\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES). For an example that shows how to create a custom list definition, see &lt;B style="mso-bidi-font-weight: normal"&gt;h&lt;/B&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="mso-fareast-language: EN-GB"&gt;ow to: Create a Custom List Definition:&lt;/SPAN&gt;&lt;/B&gt; &lt;SPAN style="mso-fareast-language: EN-GB"&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/ms466023.aspx"&gt;&lt;FONT color=#0000ff&gt;http://msdn2.microsoft.com/en-us/library/ms466023.aspx&lt;/FONT&gt;&lt;/A&gt; &lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt 11.35pt; TEXT-ALIGN: justify"&gt;&lt;SPAN style="mso-fareast-language: EN-GB"&gt;Lists can be created or modified programmatically through the object model (for example, members of the SPList and SPListCollection classes), through the Lists Web service (methods of the Lists class), and through Remote Procedure Call (RPC) protocol (see Microsoft Windows SharePoint Services RPC Methods).&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt 11.35pt; TEXT-ALIGN: justify"&gt;&lt;SPAN style="mso-fareast-language: EN-GB"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt 11.35pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="mso-fareast-language: EN-GB"&gt;Introduction to Lists&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="mso-fareast-language: EN-GB"&gt;: &lt;A href="http://office.microsoft.com/en-us/sharepointtechnology/HA100242741033.aspx?pid=CH101787241033"&gt;&lt;FONT color=#0000ff&gt;http://office.microsoft.com/en-us/sharepointtechnology/HA100242741033.aspx?pid=CH101787241033&lt;/FONT&gt;&lt;/A&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt 11.35pt; TEXT-ALIGN: justify"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="mso-fareast-language: EN-GB"&gt;List Schema&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="mso-fareast-language: EN-GB"&gt;: &lt;A href="http://msdn2.microsoft.com/en-us/library/aa543477.aspx"&gt;&lt;FONT color=#0000ff&gt;http://msdn2.microsoft.com/en-us/library/aa543477.aspx&lt;/FONT&gt;&lt;/A&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt 11.35pt"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="mso-fareast-language: EN-GB"&gt;Major Schema Definition Files&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="mso-fareast-language: EN-GB"&gt;: &lt;A href="http://msdn2.microsoft.com/en-us/library/ms479188.aspx"&gt;&lt;FONT color=#0000ff&gt;http://msdn2.microsoft.com/en-us/library/ms479188.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;H2 style="MARGIN: 12pt 0cm 6pt"&gt;&lt;A class="" name=_Toc190052186&gt;&lt;/A&gt;&lt;FONT color=#333333&gt;List Templates&lt;/FONT&gt;&lt;/H2&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt 11.35pt; TEXT-ALIGN: justify"&gt;A list template is something the end user can create by using the web interface to configure the list. This list can then be saved as a list template. This list template is stored as an *.STP file in the list templates gallery of the Site Collection. This *.STP file is stored in the content database the Site Collection resides. &lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt 11.35pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt 11.35pt; TEXT-ALIGN: justify"&gt;This file contains all the customizations made to the original List Definition, such as CAML and XML that describes the lists. The customizations require the same list definition to be installed on the server that was used to configure the list templates.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt 11.35pt; TEXT-ALIGN: justify"&gt;It is not as performant as a pure list definition as list definitions are cached on start of IIS on the web front ends while list templates are stored in the Content Database, They need to be fetched from the content database and merged with the list definition code at runtime to render the list.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt 11.35pt; TEXT-ALIGN: justify"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;H2 style="MARGIN: 12pt 0cm 6pt"&gt;&lt;A class="" name=_Toc190052187&gt;&lt;/A&gt;&lt;A class="" name=_Toc188854172&gt;&lt;/A&gt;&lt;SPAN style="mso-bookmark: _Toc190052187"&gt;&lt;FONT color=#333333&gt;Deciding Between List Definitions and List Templates&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color=#333333&gt; &lt;/FONT&gt;&lt;/H2&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt 11.35pt; TEXT-ALIGN: justify"&gt;Custom list definitions hold the following advantages over list templates:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt 29.35pt; TEXT-INDENT: -18pt; TEXT-ALIGN: justify; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;Data is stored directly on the Web servers, so performance is typically better.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt 29.35pt; TEXT-INDENT: -18pt; TEXT-ALIGN: justify; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;A higher level of list customization is possible through direct editing of a Schema.xml file.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt 29.35pt; TEXT-INDENT: -18pt; TEXT-ALIGN: justify; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;Certain kinds of customization to lists require use of site and list definitions.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt 29.35pt; TEXT-ALIGN: justify"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt 11.35pt; TEXT-ALIGN: justify"&gt;List definition disadvantages include the following:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt 29.35pt; TEXT-INDENT: -18pt; TEXT-ALIGN: justify; mso-list: l3 level1 lfo2"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;Customization of list definition requires more effort than configuring list templates.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt 29.35pt; TEXT-INDENT: -18pt; TEXT-ALIGN: justify; mso-list: l3 level1 lfo2"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;Editing a list definition after it has been deployed is difficult.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt 29.35pt; TEXT-INDENT: -18pt; TEXT-ALIGN: justify; mso-list: l3 level1 lfo2"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;Doing anything other than adding code can break existing sites.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt 29.35pt; TEXT-INDENT: -18pt; TEXT-ALIGN: justify; mso-list: l3 level1 lfo2"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;Customizing list definitions requires access to the file system of the front-end Web server.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt 11.35pt; TEXT-ALIGN: justify"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt 11.35pt; TEXT-ALIGN: justify"&gt;List templates hold the following advantages over customization of list definitions:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt 29.35pt; TEXT-INDENT: -18pt; TEXT-ALIGN: justify; mso-list: l1 level1 lfo3"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;List templates are easy to create.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt 29.35pt; TEXT-INDENT: -18pt; TEXT-ALIGN: justify; mso-list: l1 level1 lfo3"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;Almost anything that can be done in the user interface can be preserved in the template.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt 29.35pt; TEXT-INDENT: -18pt; TEXT-ALIGN: justify; mso-list: l1 level1 lfo3"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;List templates can be modified without affecting existing sites that have been created from the templates.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt 29.35pt; TEXT-INDENT: -18pt; TEXT-ALIGN: justify; mso-list: l1 level1 lfo3"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;List templates are easy to deploy.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt 11.35pt; TEXT-ALIGN: justify"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt 11.35pt; TEXT-ALIGN: justify"&gt;List template disadvantages include the following:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt 29.35pt; TEXT-INDENT: -18pt; TEXT-ALIGN: justify; mso-list: l2 level1 lfo4"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;List templates are not created in a development environment.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt 29.35pt; TEXT-INDENT: -18pt; TEXT-ALIGN: justify; mso-list: l2 level1 lfo4"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;List templates are less efficient in large-scale environments.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0cm 3pt 29.35pt; TEXT-INDENT: -18pt; TEXT-ALIGN: justify; mso-list: l2 level1 lfo4"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol; mso-bidi-font-weight: bold"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;If the List definition on which the list template is based does not exist on the front-end server or servers, the list template does not work. &lt;B&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/B&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8729197" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/brianwilson/archive/tags/architecture/default.aspx">architecture</category><category domain="http://blogs.msdn.com/brianwilson/archive/tags/development/default.aspx">development</category><category domain="http://blogs.msdn.com/brianwilson/archive/tags/list+definition/default.aspx">list definition</category><category domain="http://blogs.msdn.com/brianwilson/archive/tags/list+template/default.aspx">list template</category></item></channel></rss>