Keep track of all the latest news and events on developer tools and technologies you care about
The feature article for this week’s MSDN Flash is by Jussi Roine, Chief Architect at Onsight Helsinki.
Microsoft SharePoint Server 2010 is a major upgrade to Microsoft Office SharePoint Server 2007 (MOSS) released in May, 2010. In this article I’ll outline the essential new features and tools that as a developer you should be aware of.
If you have been developing solutions for earlier versions of SharePoint no doubt you’ve sometimes found it painstakingly obvious that Visual Studio 2008 has no built-in support for SharePoint customizations – or SPI’s (SharePoint Project Items in the 2010 world such as a Feature or Solution package). A lot of developer’s time was spent with gluing together numerous XML files that together form a Solution Package - the deliverable output of a given SharePoint project. With Visual Studio 2010 however a lot of the manual editing of resource and XML files has been taken away and all core files are now automatically generated upon building the project. This means that Manifest.xml (used to tell SharePoint how to deploy your solution), Feature.xml (used to describe a custom functionality known as a Feature) and elements-files are all kept up-to-date and generated upon each successful build.
I find this to be the single biggest productivity enhancer in my daily work. Instead of spending a day troubleshooting a deployment issue I can now trust my deployment package works as it’s supposed to.
Other notable functionality you get as a developer with SharePoint 2010 is full debugging support (hit F5 and you’re good to go, just like with regular ASP.NET sites), visibility of your SharePoint installations and farms with Server Explorer and importable Solution Packages allowing re-use of existing site templates in Visual Studio 2010.
SharePoint 2010 development support is built-in with Visual Studio 2010.
Visual Web Parts are a big advancement over regular SharePoint Web Parts that act as a kind of LEGO building block on a single SharePoint page providing custom functionality. With Visual Web Parts developers now get full design-time support allowing drag-and-drop functionality for server controls – just like regular ASP.NET pages. This is accomplished via a custom server control (an .ascx file) that is loaded automatically when the Visual Web Part is added on a page. All other aspects of a Visual Web Part are identical to regular SharePoint Web Parts.
Also with SharePoint 2010 the concept of sandboxed solution was introduced. Setting a project as sandboxed in Visual Studio 2010 essentially wraps the customization as a kind of self-service package for end-users. Site administrators and site collection administrators may manually upload and activate sandboxed solution packages without the assistance of the server administrator. Sandboxed solutions are executed in a different server process thus restricting access to classes above the SPSite-object in the SharePoint Object Model. What’s worth mentioning is that setting a Web Part as sandboxed prevents the creation of Visual Web Parts since this type of customization needs access to the SharePoint Root (the 14-hive) which is not allowed. To circumvent this be sure to install the additional Visual Studio 2010 SharePoint Power Tools for Sandboxed-compatible Visual Web Part project support.
Developer Dashboard is a highly useful feature for tracing and troubleshooting performance and customization issues in real-time. When Developer Dashboard is enabled each page can show additional tracing information such as calls to SQL databases, round-trip times and HTTP requests. Be advised however that enabling this feature also adds to the server load so it should only be used when absolutely necessary in a production environment.
To enable or disable Developer Dashboard see this sample script.
What Next? To learn more about developing solutions for Microsoft SharePoint Server 2010 start from the SharePoint Developer Center. Get Started Developing on SharePoint 2010. Download the SharePoint Developer Training Kit.