In this chapter, we will cover:
A critical component of SharePoint is lists - the place we store data in SharePoint. The familiar document library is a special type of list that is designed to hold (primarily) Microsoft Office document types that people collaborate on, check out / check in, edit, version, and approve. There are many other "out-of-the-box" SharePoint lists you can create such as Announcements, Contacts, Events (calendar), Tasks, and more! Lists are where we store our data in SharePoint.
You should strive to use the out-of-the-box lists wherever possible. Next you should look to leverage an out-of-the-box list by "inheriting" from it and then customizing your own columns. If you wish, you may also create your own custom list from scratch.
A list is composed of columns collectively they form the schema for the list. In SharePoint terms, the schema is called a Content Type, and the individual columns within the schema are called Site Columns. For example, the Contacts Content Type has columns such as First Name, Last Name, and E-mail. Finally, an instance of a contacts list will use/attach the contacts list content type.
If you have relational database expertise (such as with Microsoft SQL Server), the concepts introduced here will be familiar to you. Site Columns are equivalent to data types. The Data Definition Language (a script) will contain the definition / schema for a table. Running the script will create a physical table instance as determined by the schema.
Why does this chapter on SharePoint development begin with a lecture on Site Columns, Content Types, and Lists? The proper creation, deployment, and management of SharePoint lists and schema is an important focus of the professional SharePoint developer. I cannot think of a better example to introduce all of the basics in such a way that you will be returning to this chapter again and again for guidance!
We will be using the awesome Visual Studio 2010 SharePoint tools to create a custom document library for Proposals. The "Proposal" will be implemented with a Content Type (and Site Columns), and inherit from the out-of-the-box "document", and attached to the document library. We will also be exploring the practical use of more advanced techniques: Feature Receivers, Event Receivers, and Feature Staplers.
This forms one of the most common "professional" patterns for a SharePoint developer!
This chapter will walk through the components of this pattern.
3.17.162.26