he brand new 3.0 version of Windows Sharepoint Services (WSS) is no lightweight release. In fact, if you've had a chance to look through the new WSS SDK it's not unlikely you were a little overwhelmed with all of the new functionality in the product. And most of that new functionality comes in the form of the awkwardly acronymed VSeWSS (Visual Studio 2005 Extension for Windows Sharepoint Services 3.0).
VSeWSS is a set of extensions for WSS designed to improve the SharePoint development experience by facilitating the common tasks that all developers do. (A community preview is available now at http://www.microsoft.com/downloads/details.aspx?familyid=19f21e5e-b715-4f0c-b959-8c6dcbdc1057&displaylang=en.) Whether you're struggling to figure out just how to create a new web part, a list definition, or a site definition—or how to deploy them—VSeWSS has a solution. It is a one-stop shop for creating SharePoint solutions.
In this article I'll walk you through some of the most useful features of the new extensions and hopefully take the edge off your overloaded imagination.
Easy Web Parts
Let's face it: Getting web parts up and running from scratch is a pain. By the time you add a reference to the Microsoft.SharePoint.dll file—which is buried six levels deep in the directory structure—add the appropriate using statements, derive from the right class, and override the CreateChildControls()method so that you can start to add controls to the control tree to do something useful, you've already spent several long minutes doing some pretty mundane tasks.
|Author's Note: This article covers all of the VSeWSS features but doesn’t demonstrate the use of SharePoint Solution Generator with list definitions or the creation of a blank site definition from Visual Studio.
Automating this process may not seem like much to get excited about, but it can be a real timesaver when you're creating new web parts. However, this is just the tip of the iceburg. The magic really happens when you press F5 to debug the web part. Pressing F5 starts a process that packages up the web part and deploys it as a solution to the web site. The end result is a complete deployment with just a single key press. If you've been testing multiple versions of a web part and have done many iterations, you'll find that this is an absolutely indispensable time-saving feature.
Creating a new web part with the VSeWSS is as simple as selecting the web part project type from the New Project dialog as shown in Figure 1. Note that the new SharePoint folder underneath Visual C# was added by the VSeWSS.
|Figure 1. The New Project dialog gets new options with VSeWSS.
Of course, there are a few limitations. There's an absolute assumption that you're developing locally on a server running WSS. That means that you won't be able to do this from your workstation if you decide to write web parts from a Windows XP or Vista workstation that targets a remote WSS server. However, the best development experience will have you running a server operating system either as your primary system or at the very least running in a virtualized environment on your system; so if you're doing things wisely, this won't be an issue.
Now for another impressive advantage, press the F5 key again to start a debugging session. The existing solution is rolled back and a new solution is created and deployed. This ensures that you're always running your current code while debugging your web parts.