3

What is the exact differnace between sharepoint list and library in developer point of view?

6 Answers 6

4

From a programmer's point of view, a Library is referenced through an SPDocumentLibrary object. SPDocumentLibrary inherits from the SPList class.

A Library is a List, but all lists are not libraries.

A Library is a specific implementation of a List intended for holding documents and metadata about the documents in the columns of the Library.

1

According this blog, http://www.networkworld.com/community/node/22731, use Library for storing documents, and use Lists for data, for example, a database record. Here's a direct quote

"I dug a little deeper and did find some points about list attachments that suggest a list is probably not the best way to house documents if the organization wants to take advantage of the full range of SP features:

1) The title of the document is NOT indexed. So an end user would not be able to search on the title of the document. Example: I attached a document titled "Copy of Test Lobster.doc" but after incremental indexing I get no results searching on the word "lobster." (medium issue)

2) I can attach multiple documents to one list item, which could cause problems (minor issue)

3) You can't (to the best of my knowledge) display the name of the attached document. You only see the paperclip that signifies the attachment. (major issue)

4) You don't have document control, no check-in or check-out. (major issue)"

1
  • That quote is from a 5 year old article and may not be accurate anymore.
    – Tom Resing
    May 16, 2013 at 20:17
1

I would say except the content type their is no difference between list and library the base content type for both differs for other programming differences kindly go through the following url

http://msdn.microsoft.com/en-us/library/dd490727(v=office.12).aspx

1

Libraries can hold files so a few additional methods/properties such as Item.File are valid for accessing the files. Anything involving the metadata columns will be much the same.

1
  • Yes, but that is a different property - it is treated quite differently from the document library file. Jul 21, 2011 at 14:24
1

A document library is a specialized form of a list that has additional features to manage documents. This is also evident in the SDK where you can see that SPDocumentLibrary extends SPList.

Another way to think of the difference is that a document library contains documents while a list contains "contentless" documents (aka only metadata) - although this is slightly violated by means of attachments.

0

Difference:

List:

  1. Don’t have Check in Check Out feature.
  2. Have Major Versioning only.
  3. We can attach multiple files to a List Item.
  4. “Upload Document”, “Download a Copy” option not available.
  5. Attached document is not searchable by Title.
  6. Cannot display the name of attached file (only See paperclip symbol).

Library:

  1. Have Check in Check Out feature.
  2. Supports Minor (draft) and Major (Published) versioning.
  3. 1 Library item cannot have multiple files.
  4. “Upload Document”, “Download a Copy” option is available.
  5. Can perform search by title of a document.
  6. Able to see Title of document and can also rename the title.

Internally SharePoint treats both library and list as a list.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.