Wednesday, November 17, 2004

SharePoint development part I - Webparts

When we think about developing on the SharePoint platform, the first thing that comes to mind is webpart development but there are actually more development tasks with SharePoint:


  1. Web part development : one of the SharePoint development topics which gets the most attention

  2. Developing with SharePoint lists : involves creating xml schema definitions, writing SharePoint Object Model code, adding your own UI

  3. Writing custom workflow: SharePoint does not provide workflow out of the box but allows you to add your own workflow through the use of eventhandlers

  4. Customizing SharePoint UI : starts from simple things like changing stylesheets, images and logos to create completely new site templates

  5. Extending and customizing SharePoint search


In the coming weeks I will write more postings about SharePoint but in this first posting I'm going to focus on webpart development. You should approach webpart development as any other programming task.

  1. Make sure you understand the basics. A good article to start with is A developers introduction to webparts on MSDN or The definitieve hello world webpart from John Durant

  2. Think about the design, what you want to accomplish. Since webparts are basically enhanced ASP.Net server controls which live in SharePoint context, the number of options are immense. But you also have to think about the enhancements which are provided by the webpart framework. So if you want to just display data maybe think about using the dataviewwebpart for the moment and don't immediately start with a datagrid. Know the potential of connectable webparts. Definitely check out the 3 articles from Patrick Tisseghem:

  3. Developing and debugging For debugging definitely check out this posting
    Debugging Web Parts - a full explanation of the requirements Something which is also easily forgotten is that you can also force a debug from within your code with the following statement System.Diagnostics.Debugger.Break()

  4. Deploying and testing: Deploying webparts isn't that simple, but there are some nice tools out there to help you with the deployment such as InstallAssemblies. I recommend however doing all the steps manually a couple of times, this will help your understand how SharePoint works. One of the nicest tools to aid in deployment is wppackager. WPPackager will create MSIs to install the webparts. For testing your webparts you should take a look at
    Testing webparts checklist on MSDN





More links
  • Tips for building webparts from Daniel McPherson
  • Webcast - The power of the dataviewwebpart

  • SPSFAQ customization section
  • More SharePoint customization tips :here and here
  • Server.Transfer wont work in a WebPart

  • Server configurations which may lead to web part failures
  • 1 comment:

    Anonymous said...

    I"ve been doing some further thinking around the developmnt packaging in SharePoint and wondered if you take a look and leave your thoughts.
    http://wss.made4the.net/archive/2008/05/26/solution-development-in-sharepoint-2007.aspx