I just returned from the 5 day SharePoint 2010 Ignite Training for Developers in Amsterdam. The training was an invitation-only opportunity for Mircrosoft’s top-tier partners to get hands-on experience with the latest and greatest features in the upcoming SharePoint release. I feel very fortunate to have had the opportunity to go to this event and to have had such an in-depth look at what should prove to be one of Microsoft’s most exciting product releases ever. We learned about the many new features that will make the SharePoint platform an easier and richer experience for both developers and users. I’ll give you a brief overview of some of my favorites.
Visual Studio Tools
Visual Studio 2010 includes templates for creating all kinds of SharePoint items including list definitions, workflows, web parts, and event receivers. SharePoint project templates include integrated support with visual designers for feature and WSP creation. When adding a new SharePoint item such as a list definition or web part, Visual Studio will automatically create the feature definition needed to deploy the item.
Mapped Folders allow items to be added to folders that map to the RootFiles folder structure (now the 14 hive). When added to your Visual Studio project, any files placed within these folders will be included in the WSP generated by the project and deployed to the mapped folder under the 14 hive.
Visual Studio 2010 also includes the ability to manage WSP deployment automatically from within the build process. When the project is created, it can be associated with a SharePoint site for development purposes. After this is done, the solution can be deployed directly from Visual Studio making it easy to debug using the Visual Studio debugger. The F5 debugging experience for a SharePoint project does the following:
- Builds the DLLs and the WSP
- Deactivates and uninstalls the features
- Retracts the old WSP
- Adds and deploys the new WSP
- Activates the features in the associated site
- Attaches the debugger to the W3WP process for the associated site
The SharePoint Explorer window within Visual Studio gives easy access to artifacts within a SharePoint site running locally.
Best of all, these tools within Visual Studio are highly extensible and customizable. You can create your own SharePoint item templates, develop custom visual designers, and extend the SharePoint Explorer window with additional nodes and information.
Other Developer Tools
Another really useful tool to help with debugging is the SharePoint Developer Dashboard. When enabled on your site, this tool provides some excellent debugging and diagnostic information about the execution of web parts on the page.
SharePoint Designer enhancements make it a useful tool not only for power users, but also for developers. There is now tighter integration between work done in SharePoint Designer and Visual Studio. Items such as workflows, content types, lists, and pages can be prototyped in SharePoint Designer, exported to a WSP and then imported into Visual Studio to be integrated with other project artifacts and source control.
SharePoint Designer also provides a powerful interface for working with Business Connectivity Services (formerly known as the Business Data Catalog) and creating External Content Types and Lists. See my previous blog post for a detailed look at this new capability.
As I wrote in previous posts, PowerShell will become an indispensible tool for both developers and administrators. PowerShell cmdlets will replace STSADM as the preferred admin shell for SharePoint and the ability to write custom cmdlets will make it easy to automate all kinds of tasks. For more details, check out my posts on SharePoint 2010 and PowerShell and accessing the object model with PowerShell.
Feature and Solution Improvements
In addition to the direct integration with Visual Studio for creating features and solutions, there are many other improvements to the feature/solution framework that will make it more powerful and easier to work with. First among these is the new type of solution called a Sandboxed Solution that allows solutions to be deployed in an isolated manner that prevents custom code from accessing resources that could cause damage to the farm. Other new capabilities at the solution-level include solution activation dependencies, application resource files, and solution versioning.
In the feature framework, new capabilities include versioning, declarative upgrade actions, and a hookable feature upgrade event; feature-level solution activation dependencies, and new events including web provisioning and workflow events.
The out-of-the-box SharePoint UI has been completely overhauled to take advantage of AJAX capabilities to improve the user experience by eliminating a great deal of the post-back and navigation that was necessary to perform common tasks within SharePoint 2007. The new UI also introduces the ribbon concept from Office 2007 to consolidate commands into one location and present the user with the most relevant commands for the current context. Most important from a developer perspective, the ribbon and list dialogs can be customized with additional commands and information. Also the AJAX dialogs can be leveraged to provide custom capabilities in a manner consistent with out-of-the-box features.
Perhaps the most exciting change to the UI is the new level of standards compliance. The platform will now emit well-formed XHTML and provides better support for Firefox and Safari.
To support these improvements, the CSS and master pages have been completely overhauled and SharePoint now includes simple and minimal master pages to assist with custom development.
LINQ to SharePoint
Probably my favorite new feature is the direct integration of LINQ to SharePoint into the platform. The CodePlex project has become part of the platform itself and a new RESTful web service has been added to support access to list data via ADO.NET Data Services. These new features will make it easier to get at list data in a concise and efficient manner whether you are on the server, in an AJAX application, or in a .NET thick-client.
The main benefit of LINQ to SharePoint is that it allows developers to write efficient queries against SharePoint lists without the need to write CAML. Developers write their queries in LINQ and the LINQ to SharePoint provider translates them into CAML before retrieving the data from the list. This is a huge benefit to those of us who like prefer the simple, clear, and consistent LINQ syntax to the verbose XML of CAML.
The RESTful ListData.svc service is a major upgrade over Lists.asmx. Rather than crafting complex CAML to query the service and then parsing a messy XML result set as was done with Lists.asmx, we can now retrieve list data via simple URL/query string syntax and have the results sent back either formatted either as Atom or JSON. Check out my recent blog post for more information on ListData.svc.
Client Object Model
The classes in these libraries mirror various classes within the Microsoft.SharePoint assembly.
The client-side classes encapsulate calls to the Client.svc web service which in turn utilizes the server-side object model to execute the requested update or query. The web service then sends back a response with the return value formatted as JSON.
As you can see, there is a lot for developers to get excited about in SharePoint 2010. Have fun playing around with these new features in the beta and getting ready for the release next year.