Best Practices for SPList access and Web Part development

Published 02 December 08 01:50 PM | Blogging about SharePoint: Posts
Body:

So I've been looking through the new (as of 5 Nov 2008) SharePoint Guidance on Microsoft.com at www.microsoft.com/spg .

It's not immediately obvious, but if you click on the last (right-most, at least in left-to-right languages) breadcrumb, you get a drop down list of other very useful sections that are also SharePoint P&P Guidance.

image

Under Development Activities for example,there are 7 How To's - go here to see them all: http://msdn.microsoft.com/en-us/library/dd206918.aspx

The one that is currently of interest to me is  How to: Wrap a User Control Inside of a Web Part for SharePoint.  This is because I need to build a web part or two right now, and a user control provides a nice design surface, that the web part itself does not.  This article provided step by step instructions, but no code download.  Since I had to create a web part anyway, I followed the instructions and posted the resulting project to my 3rd CodePlex project, http://www.codeplex.com/PNPUCinWP .

You can download it from there - it should save you some time.

Also, one of the two QuickStarts shows 3 different ways to access a SharePoint list.  The three ways are:

  1. Direct list access
  2. List Item Repository (1 layer of abstraction)
  3. Entity (such as Announcements) Repository (2 layers of abstraction)

These are explained at the end of the QuickStart, which is here: http://msdn.microsoft.com/en-us/library/dd206917.aspx 

--Michael

Published: 12/2/2008 10:51 AM
Del.icio.us | Digg It | Technorati | Blinklist | Furl | reddit | DotNetKicks

Read the complete post at http://feeds.feedburner.com/~r/BloggingAboutSharepoint/~3/472769708/ViewPost.aspx