SharePoint Applied: Visual Studio 11 Beta and SharePoint Development
SharePoint 2007, in many ways, was a v1 release. It was the first time .NET was properly applied to SharePoint, and from SharePoint 2007 onwards the product has done very well. Partly because of the rich built in functionality that comes with SharePoint and party because of its extensible nature - things developers can do.
As we are all painfully aware, the development tools for SharePoint 2007 were somewhere between absent and woefully inadequate. A huge part of that gap was filled by the community with tools such as WSPBuilder. If you have developed for SharePoint 2007, undoubtedly you must know about WSPBuilder (wspbuilder.codeplex.com).
Things changed with Visual Studio 2010. With it, Microsoft released a very mature, well-thought toolset for developing SharePoint 2010 solutions. For a v1 release, it was surprisingly good. For the last several years of SharePoint 2010-based development, I haven’t missed WSPBuilder.
We are at yet another cusp now. Microsoft is releasing new versions of everything: Windows, Office, SharePoint, Visual Studio, Metro apps, etc. Throughout 2012 we are going to experience a paradigm shift.
The question this begets is what is new in Visual Studio 11 Beta (rumored to be called Visual Studio 2012) specifically for SharePoint developers?
New Designers - Lists, Content Types and Site Columns
Admit it, you’ve done it! You’ve enrolled in the SharePoint university of reverse engineering (http://blah.winsmarts.com/2008-2-Dev_Tip__The_SharePoint_University_of_Reverse_Engineering.aspx), to first hand-create the content type you want, generate the XML for it, and then include that in your Visual Studio project. We have all done it - directly or indirectly using tools. This is no longer necessary.
Visual Studio 11 Beta includes new designers for content types and lists making it so much easier than before to author these SPIs (SharePoint Items). When you add a content type or a list definition into your Visual Studio project, a list designer opens up or a Content Type Designer (Figure 1) opens up that lets you visually craft up the structure of the content type or list definition. The best part - the most difficult part of authoring views for a list definition - is now a matter of checking checkboxes for the columns you’d like to see in the view. You can see this in Figure 2.
Figure 1: The new Content Type Designer.
Figure 2: The new List Designer.
As far as site columns, there is a new SPI called site column. You simply right-click on your Visual Studio project and choose to add a new site column, and then merrily edit the <Field> element in the newly added Elements.xml.
Silverlight Web Parts
While we argue about HTML5 vs. Silverlight, one thing we all can agree upon - developing Silverlight Web Parts in Visual Studio 2010 required too many repetitive manual steps. You had to create a SharePoint solution, a separate Silverlight project, and then with custom build action, copy the file over to a specific location - argh! In Visual Studio 2011, these steps are simplified to a single step - Create a “SharePoint 2010 Silverlight Web Part.”
That is basically it! Visual Studio 2011 now includes a project template that simplifies all those tasks.
By: Sahil Malik
Sahil Malik is a Microsoft MVP, INETA speaker, a .NET author, consultant, and trainer, and a well-rounded overweight geek. He has a passion for SharePoint, data access, and application architecture.
Sahil loves interacting with fellow geeks in real time. His talks are full of humor and practical nuggets. His talks tend to get very highly charged, fast moving, and highly interactive.
You should check out his blog at http://blah.winsmarts.com