Microsoft SharePoint Developer Documentation Team Blog
The Official Blog of the SharePoint Developer Documentation Team

October, 2009

  • Microsoft SharePoint Developer Documentation Team Blog

    SharePoint 2010 SDK Code Samples Posted to Code Gallery


    For the SharePoint 2010 release, we’re trying something a little different with our sample code solutions. During the Beta timeframe, we’re going to be posting them to Code Gallery, rather than waiting to release them in the SharePoint 2010 SDK for the first time at RTM. This will let developers benefit from having the code samples available as early as possible. And we’re hoping it’ll benefit the code samples by having the SharePoint developer community giving us feedback on the samples and how we can make them better. We’ll include the code samples in their final form in the SharePoint 2010 SDK download at RTM.

    We’ll be keeping the list below up-to-date each time we release a new code sample, so you might want to bookmark this post. (We’ve already got three samples posted, and the SharePoint 2010 Beta isn’t scheduled for public availability until next month.)

    Unless otherwise noted, each code sample is written in C#.

    SharePoint Foundation 2010 Code Samples

    Implementation of IBackupRestore 

    This sample is a custom content class that implements Microsoft.SharePoint.Administration.Backup.IBackupRestore. Objects that instantiate this interface appear in the backup/restore UI of the SharePoint Central Administration application as items that can be selected for backup or restoration.

    SharePoint Server 2010 Code Samples

    Activity Feeds Console Application

    A console application that demonstrates the basic functions of a custom activity feed gatherer application.

    This sample creates a custom activity feed gatherer and demonstrates how to use the new Activity Feed object model in Microsoft SharePoint Server 2010. The sample creates custom ActivityTemplate, ActivityType, and ActivityEvent objects and shows how to publish and multicast events from a custom gatherer. Console output verifies that each step in the application is finished.

    Social Data Statistics Web Part 

    A Web part that displays social data statistics.

    This sample consists of a Microsoft Visual Studio 2010 SharePoint Visual Web part project. After you build and deploy this project on your Microsoft SharePoint Server 2010 site, you can add this Web part to any page where you want to display statistics for the social tagging activities of your users. The Web part displays the following information in three tables:

    ·         Each URL that has been tagged, and the terms with which each URL has been tagged.

    ·         Each term that has been used in a social tag, and the number of times that term has been used.

    ·         Each user who has added a social tag, and the number of times that user has tagged URLs.

    The sample demonstrates how to use the new Social Data object model in SharePoint Server 2010. It also takes advantage of the SharePoint Visual Web Part template, one of the new SharePoint templates that you can use in Visual Studio 2010.

  • Microsoft SharePoint Developer Documentation Team Blog

    First Look: SharePoint 2010 Developer Documentation Now Live on MSDN!


    By now you’ve probably been hearing some of the big news coming out of the SharePoint Developer Conference being held this week in Las Vegas. Doubtlessly, there’ll be tons more great information coming out of the Conference over the next four days concerning what’s new and notable in SharePoint Foundation 2010 and SharePoint Server 2010. But if you weren’t lucky enough to make it to Vegas this year, or are there but can’t wait for the session on your favorite area of SharePoint development, then have we got something you’ll want to take a close look at:

    Introducing the SharePoint 2010 (Beta) Developer Center

    That’s right, this morning we launched the SharePoint 2010 (Beta) Developer Center on MSDN. We’re using this new, combined Developer Center to give you your first detailed, public technical information and instruction around both SharePoint Foundation and SharePoint Server 2010. This new sub-site of the revamped SharePoint Developer Center highlights some early videos, documentation, and hands-on lab walkthroughs to introduce you to the exciting developer features on both SharePoint Foundation 2010 and SharePoint Server 2010.

    But that‘s not all: we’ve also published a Beta release of the combined SharePoint 2010 SDK!

    You’ll definitely want to spend some time on the site, getting ramped up for when the SharePoint 2010 Betas are released in November.

    Learn SharePoint from the Ground Up

    Of particular interest to developers new to SharePoint will be the Get Started Developing on SharePoint 2010. We’ve put together a series of 10 modules to help you get your feet wet on some of the main areas of SharePoint development, including:

    ·         Building Web Parts

    ·         What Developers Need to Know About SharePoint 2010

    ·         Building Blocks for Web Part Development

    ·         Accessing Data and Objects with Server-Side APIs

    ·         Accessing Data and Objects with Client-Side APIs

    ·         Accessing External Data with Business Connectivity Services

    ·         Developing Business Processes with Workflows 

    ·         Creating Silverlight User Interfaces

    ·         Sandboxed Solutions for Web Parts

    ·         Creating Dialog Boxes and Ribbon Controls

    Each module includes multiple video lessons, as well as code samples and hands-on lab walkthroughs, to give you a firm grounding in the topics covered.

    Even experienced SharePoint developers will want to take a look at the modules that cover brand new development areas, like the client-side APIs, Silverlight user interfaces, sandboxed solutions, and the new ribbon user interface.

    Get Your First Look at What’s New for Developers in SharePoint 2010

    For an even deeper look at what’s new and notable in SharePoint Foundation and Server 2010, we’ve posted a Beta version of the combined SharePoint 2010 SDK. It’s packed with conceptual, procedural and reference material covering the major developmental areas of both Foundation and Server. All in all, it’s almost half a million words detailing how to develop SharePoint solutions.

    For example, take a look here for what’s new in SharePoint Foundation 2010, including:

    ·         Alerts Enhancements

    ·         Business Connectivity Services

    ·         Client Object Model

    ·         Events Improvements

    ·         Microsoft Synch Framework

    ·         Mobile Device Development Enhancements

    ·         Query Enhancements

    ·         Ribbon

    ·         Sandboxed Solutions

    ·         Service Application Framework 

    ·         Silverlight Integration and the Fluid Application Model

    ·         UI Improvements

    ·         Windows PowerShell for SharePoint

    ·         Workflow Improvements

    And take a look here for what’s new in SharePoint Server 2010, including:

    ·         User Profiles and Social Data

    ·         Business Connectivity Services (BCS)

    ·         Enterprise Content Management (ECM)

    ·         SharePoint Enterprise Search

    ·         PerformancePoint Services

    ·         Excel Services

    Some other places you might want to start:

    ·         If you’re newer to SharePoint development, you might want to spend some time in the Getting Started and Building Blocks sections of the SDK, getting a firm grounding in the basics.

    ·         If you’re coming to SharePoint from an ASP.NET development background, but sure and check out the Glide Path for ASP.NET Developers section, which is specifically aimed at developers transitioning from ASP.NET development to development on the SharePoint Foundation platform.

    Let Us Know What You Want

    Now, this SDK is a Beta release, so you’ll likely see some rough edges. But we’ve combined this SDK to cover both SharePoint Foundation and Server, and restructured it to present the continuum of SharePoint development in as logical and intuitive a way as we could. We then packed it with new and updated conceptual, procedural, and reference material.

    We’d love to hear what you think of what we’ve done. As always, as you read through the SDK, if you spot issues, don’t see the information you need, or have suggestions, please drop us a line and let us know how we can improve our developer documentation. It’s easy; just do one of the following:

    ·         Enter a comment in the MSDN ratings box

    ·         Email us directly at docthis (at)

    ·         Email us through this blog

    Be sure and check back here often (or even better, subscribe to our RSS feed), as we plan on using the blog to preview draft versions of additional SDK content as it gets written.

  • Microsoft SharePoint Developer Documentation Team Blog

    Got Code?


    Contribute a Code Sample and Get Your Name in the SharePoint 2010 SDK

    We’re looking for experienced SharePoint developers to share their skill and technical expertise with the SharePoint community. You’ll help your fellow SharePoint developers, and receive full attribution in the SharePoint SDK for doing so!

    What we’re looking for are short code samples, what we on documentation teams tend to think of as ‘snippets’. A handful of lines that illustrate a discreet task or show how to exercise a specific piece of the object model, rather than a full-blown solution that addresses an entire scenario. Basically, the short code samples you’d find in a typical reference topic like this one.

    In particular, we’re on the hunt for code samples that do one or more of the following:

    ·         Show developers how to accomplish common SharePoint tasks programmatically

    ·         Illustrate best coding practices in using the SharePoint object model

    ·         Demonstrate how to avoid pitfalls when using lesser-known areas of the SharePoint object model

    ·         Or otherwise show off the power and flexibility of developing SharePoint solutions

    If you’re an experienced SharePoint developer, you probably have a toolbox of code snippets like these already; sections of code that you use over and over to perform the same routine tasks, or pieces of code that you’re particularly proud of having come up with as work-arounds for some of the, um, “eccentricities” of the SharePoint object model.

    What we’re asking is that you share your hard-won knowledge by letting us publish your code samples in our SDK reference topics. In return, we want to make sure you get full credit, by giving you attribution right in the topic where the code sample appears. This includes a link to your company site. You can see an early example of this in this reference topic for the CreateTaskWithContentType class.

    The SDK gets more real-world code samples, and you get increased visibility within the larger SharePoint developer community.

    To submit a code sample, just shoot us an email including your code sample(s) at Include a short description of what each code sample does, or what task you would use the code sample to accomplish. Oh, and if there are any prerequisites that need to be specified for your code sample to run successfully, that’d be great to know as well. (For example, the code sample on the SPList class topic lists a few using directives, and the existence of an .aspx page containing a label control, as prerequisites.)

    I’ve attached a zip with our code sample guidelines and some sample data to this post. These are the best practices for writing code samples that we give our external partners who write samples for us. For the best chance of getting your sample included in the SDK, take a look at the best practices for code snippets (the guidelines are really short, and won’t take more than a few minutes to review, I promise.)

    Now, since the SharePoint 2010 Betas aren’t due out until November, for now we’re talking about code snippets written against the WSS 3.0 or MOSS 2007 object models. Go ahead and send them our way. And once you’ve worked with the SharePoint 2010 Betas a bit, you’ll undoubtedly create some useful or illuminating code samples in fairly short order. Send those our way as well. You could end up with a byline in the SharePoint SDK!

    Any questions, feel free to ping, or leave a comment.

Page 1 of 1 (3 items)