Monday, August 27, 2012

SharePoint 2010 Development in Visual Studio 2012

There is plenty to get excited about for SharePoint 2010 developers with Visual Studio 2012. A new content type designer, a more intuitive template structure and Javascript intellisense are a few of the things that will make most of our lives a little easier. Below, I outline a few of the new features for SharePoint 2010 developers in Visual Studio 2012.

Content Type Designer
Content types are a critical component of SharePoint development. Unfortunately, they have a legacy of a rather unusual inheritance structure. Inheritance is done through the content type id. This is a nuisance for SharePoint developers that have to remember content type ids or constantly look them up. Now there is a Content Type item template and designer that provides a nice little drop down for setting up inheritance:



Once you have selected what content type you would like to inherit from, you are presented with a nice little designer. While I am not a huge fan of many of the Visual Studio designers, I do like this one because it simplifies the rather mundane task of adding columns to your content type.


Note that this designer builds out a declarative content type. Also note that if you add a new site column using the new site column item template, the site column is immediately available for selection in the content type designer.

I did notice some quirky behavior. For example, when I double click on the elements.xml file for the content type in order to view the raw xml, I am presented with a dialog box that tells me the file is already open (even though it is not) and asks me if I want to close it. If I click yes, the raw xml is opened and the designer closes. That is what I wanted, but the dialog was a little confusing.

Streamlined Templates
Many of the SharePoint 2010 project templates were moved to item templates. This more closely aligns the templates with how SharePoint developers setup their projects and solutions. In Visual Studio 2010 most of us got in the habit of creating a blank SharePoint project and building from there. In Visual Studio, you will select the "SharePoint 2010 Project" template instead, which really isn't much different, but a lot of the noise has been reduced.

There are now just a few SharePoint 2010 project templates. Below are the templates available in Visual Studio 2012 out of the box.



Most of the templates are now at the item level. Below are the SharePoint 2010 item templates available in Visual Studio 2012 out of the box.



Note that the item level templates now specify whether they are available as Sandbox solutions ("Farm Solution only").

You can find all of the documentation on the SharePoint 2010 templates available in Visual Studio 2012 here: http://msdn.microsoft.com/en-us/library/ee231554.aspx

Javascript Intellisense
If you work with Javascript on a regular basis, you probably have a tool that provides Javascript intellisense (I personally love ReSharper by JetBrains). But if Visual Studio 2012 can provide it as part of the built in functionality...even better.

 

What Else
There is a new, lightweight find bar (I was always moving my find window around in Visual Studio 2010 because it was so big and clunky).


Project managers will love the much improved Agile and Scrum templates for Team Foundation Server 2012. And, of course, Visual Studio 2012 integrates perfectly with them. You can update work items, track bugs, manage builds, and even set alerts all from the comfortable confines of Visual Studio 2012.

Visual Studio 2012 officially launches on September 12 but is available now (http://www.microsoft.com/visualstudio/11/en-us). If you haven't already tried it, you should. I think you will like it.

7 comments:

  1. Can I just say what a relief to find someone who actually knows what they are talking about on the internet. You definitely know how to bring an issue to light and make it important. More people need to read this and understand this side of the story. I cant believe you're not more popular because you definitely have the gift.Many of the SharePoint 2010 project templates were moved to item templates. This more closely aligns the templates

    ReplyDelete
  2. Nice post! that is good information, it is useful to me thanks.

    ReplyDelete
  3. Nice post! that is good information, it is useful to me thanks.

    ReplyDelete
  4. So you be familiar with about “Governance” from all perspectives in the SharePoint community

    ReplyDelete
  5. Nice lineout on the new differences for visual studio 2012 concerning sharepoint development. Thanks Great to see that you are sharing the knowledge Doug !

    ReplyDelete
  6. SharePoint 2010 Development capabilities help companies quickly respond to changing business needs. In addition to sharing of documents, creation of workflows, group/team sites etc. advanced search and collaboration features have been added into the portal making it much desired for both intranet and internet web presence.

    Thanks.

    ReplyDelete
  7. In Visual Studio 2010 most of us got in the habit of creating a blank SharePoint project and building from there.

    ReplyDelete