Ads

Monday, 27 June 2016

Use list defination & List Template in sharepoint


The UI can only create a list on a single server, in a single site. You can't copy this list to a different server, eg. to deploy it from your development machine to the production server.

It's also difficult to use the same list in different site collections or web applications. While you can save a list as a template, you can only use this template in the site collection it was created in.

The only way to define a list that you can easily deploy to multiple servers is by creating a list definition. Otherwise you'll have to backup and restore your entire site from one server to the other,

Deploying using a list definition can take seconds. Deploying by backup/restore can actually take day.

Main point is, There are list form customizations that can't be done without modifying the actual list definition.
Advantages of List defination
  • Data is stored directly on the Web servers, so performance is typically better
  • A higher level of list customization is possible through direct editing of a Schema.xml file
  • Certain kinds of customization to lists require use of site and list definitions.
 List definition disadvantages
  • Customization of list definition requires more effort than configuring list templates
  • Editing a list definition after it has been deployed is difficult.
  • Doing anything other than adding code can break existing sites
  • Customizing list definitions requires access to the file system of the front-end Web server
List templates advantages
  •  List templates are easy to create
  • Almost anything that can be done in the user interface can be preserved in the template
  • List templates can be modified without affecting existing sites that have been created from the templates
  • List templates are easy to deploy
List template disadvantages
  • List templates are not created in a development environment
  • List templates are less efficient in large-scale environments
  • 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
 Different between list template & list defination
 List Definition:
A list definition defines a schema for a SharePoint list. It contains information on what views are being used, which columns and content types are being used, and other metadata information.
A list definitions are created by using Visual Studio.
List Template:
A list template can either be created by end users through the SharePoint user interface using an existing list as a pattern or using an existing list instance. If based on a user-created list it is called a custom list template. A custom list template includes everything that defines the list, including list columns and site columns used by the list, content types used by the list, views defined for the list, and so on.
A list templates are created in SharePoint or SharePoint designer

Reference: One

No comments:

Post a Comment

Ads