20.4. Data Storage Options

Almost every custom application needs to store data in some manner. In a traditional ASP.NET 2.0 application, data is usually stored in a relational database such as SQL Server. This is achieved in SharePoint using one of two options: SharePoint lists or an external database.

20.4.1. SharePoint Lists

The ASP.NET 2.0 developer's first instinct is to store data used by a custom application in a database. Before doing so, however, developers should consider using SharePoint's internal store constructs: lists! Utilizing lists has many advantages over using a database in a SharePoint application. SharePoint lists are similar in many ways to a database table. Both have columns and rows, although the terminology is used a bit differently. Database tables also have triggers, a way for developers to add business logic before and after an action is committed on the table. SharePoint lists have a similar concept called event receivers, which also support pre- and post-logic processing on actions.

All the CRUD pages are provided OOTB to perform inserts, updates, deletes, and selects on the contents. In addition, all the content in the lists can be indexed and searched using the OOTB search functionality provided in SharePoint.

Other common requirements in custom applications are included with SharePoint lists that would usually require custom development. The following list touches on some of the more popular ones:

  • Versioning and content approval — Many applications ...

Get Professional SharePoint® 2007 Web Content Management Development: Building Publishing Sites with Office SharePoint Server 2007 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.