SharePoint 2010: Part 4: Preparing for 70-573 TS Microsoft SharePoint 2010, Application Development


Web parts are cool… Ask someone to name five features of SharePoint and they will almost always mention web parts. And the best thing, most of what you need to know about web parts is how to create ASP.NET 2.0 web parts.


Skills Being Measured:
Developing Web Parts and Controls (21%)

Create Web Parts

  • This objective may include but is not limited to: including properties, controls using Render vs. CreateChildControl, life cycle,  visual, standard Web Parts,  
  • This objective does not include: trivial case where developer uses Visual Web Part project template

Create connectable Web Parts

  • This objective may include but is not limited to: Implement consumer/provider interfaces

Debug Web Parts

  • This objective may include but is not limited to: ULS log, and event log, debug.log tracing, developer dashboard

Create and implement delegate controls

  • This objective may include but is not limited to: overriding existing controls with lower sequence, developing and using .ascx files




Web Parts in General

If you have not worked with web parts before go and find any of the good books or online tutorials and videos on SharePoint 2007 web parts. Maybe start with this book: Inside Microsoft Windows SharePoint Services 3.0  or attend a good SharePoint 2007 or 2007/2010 dev class (like mine!).

What’s new in 2010?

  • Visual Web Parts
  • Debugging info from the Developer Dashboard
  • Using the templates and deploy options in Visual Studio 2010
  • Sandboxed Solutions (several web part restrictions)

Web Part Notes:

  • Know how to write code for custom connection interfaces, and the SharePoint interfaces
  • Know the difference between, and when you would use, System.Web.UI.WebControls.WebParts.WebPart (recommended) or Microsoft.SharePoint.WebPartPages.WebPart (mostly for backward compatibility)
  • Know what can be used in Sandboxed Solutions
    • Visual Web Parts = no
    • Microsoft.SharePoint.WebPartPages.WebPart = no
    • No Web Part connections
    • Asynchronous postbacks in Web Parts in sandboxed solutions are not supported and will not function
    • must have the AllowPartiallyTrustedCallers attribute set at the assembly level
  • Know how to deploy a web part as a Feature and as a Solution
  • Know all about Safe Controls
  • Know how to deploy using Visual Studio 2010 and how to manually deploy
  • Debugging
    • Debugging from Visual Studio on a local machine
    • Debugging from Visual Studio on a remote server
    • How to enable (and disable) the Developer Dashboard (STSADM, PowerShell and code)
    • Know where SharePoint logs things: Windows Event Logs, …\14\LOGS

Delegate Controls:

  • Basically a SharePoint control (<SharePoint:DelegateControl …/>) and a .Net user control ( *.ascx )
  • Need to know:
    • How to add SharePoint:DelegateControl to a page or a master page
    • How to deploy an ASCX control to ..\14\TEMPLATE\CONTROLS
    • How to associate an ASCX control to a DelegateControl (a Feature!)
    • How to declare a Safe Control in the web.config



Note: Many of these links include a link to the 2007 version of the documentation, so also check the 2007 version for “Community Comments”.

  • Web parts

MSDN: Web Parts in SharePoint Foundation

MSDN: System.Web.UI.WebControls.WebParts.WebPart

MSDN: Microsoft.SharePoint.WebPartPages

MSDN: AllowPartiallyTrustedCallersAttribute Class

  • Logging and Debugging

MSDN: What's New In Logging for SharePoint Foundation 2010

MSDN: Using the Developer Dashboard

MSDN: Using SPMonitoredScope

MSDN: Logging For SharePoint Developers

MSDN: Overview of Unified Logging System (ULS) Logging

  • Delegate Control

(2007)  MSDN: Delegate Control

MSDN: Delegate Control

MSDN: DelegateControl Class



How-to’s, Tutorials, etc.


Video: Module 1: Getting Started: Building Web Parts in SharePoint 2010

Video: Best Practices on Building SharePoint 2010 Web Parts with Visual Studio 2010

Video: Advanced Web Part Development in SharePoint 2010 

Connect Web Parts in SharePoint 2010

Create Visual Web Parts for SharePoint 2010


How to: Customize a Delegate Control



No comments:

Note to spammers!

Spammers, don't waste your time... all posts are moderated. If your comment includes unrelated links, is advertising, or just pure spam, it will never be seen.