Visual Studio 2010

Visual Studio has been Microsoft’s cornerstone development product since way back in the Visual Basic (VB) days. Visual Studio 2010 continues that long tradition with a revamped UI and several new features that further cement the product as the premier code development platform. In this article I review Microsoft’s Visual Studio 2010 release and discuss some of its most important new features.

New Editions

Microsoft made some big changes to the editions of Visual Studio that are offered in the 2010 release. The old Visual Studio Standard Edition was dropped and replaced with a new high-end Ultimate Edition. In addition, an all-new Test Professional Edition was added to the product lineup. Visual Studio 2010 consists of the following editions:

Visual Studio 2010 Professional with MSDN Essentials

Visual Studio 2010 Professional with MSDN

Visual Studio 2010 Premium with MSDN

Visual Studio 2010 Ultimate with MSDN

Visual Studio Test Professional 2010 with MSDN

All the paid editions of Visual Studio now come with an MSDN subscription. At the low end is Visual Studio 2010 Professional, with a one-year MDSN Essentials subscription that provides access to the current core Windows platforms: Windows 7 Ultimate, Windows Server 2008 R2 Enterprise, and SQL Server 2008 R2 Datacenter. In the middle of the lineup, Visual Studio 2010 Professional provides access to the core Windows platforms, previous versions of Windows, and SQL Server. This edition doesn’t provide access to other Microsoft server platforms. At the high end, Visual Studio 2010 Ultimate offers a full MSDN subscription. If you’re interested in the cloud, each edition provides access to Microsoft’s Windows Azure platform. For more information about Visual Studio 2010 editions, including prices and feature sets, see Table 1. You can find even more detailed information about the features available in different versions of Visual Studio 2010 at www.microsoft.com/visualstudio/en-us/products.

Windows Presentation Foundation–Based IDE

One of the biggest and certainly the most obvious changes in Visual Studio 2010 is the updated UI used in the Visual Studio Integrated Development Environment (IDE). Notably, the new interface doesn’t sport the Ribbon that is now prevalent in many other new Microsoft products. Figure 1 shows Visual Studio 2010’s new Windows Presentation Foundation–based IDE.

Windows Presentation Foundation gives Visual Studio 2010 several capabilities that weren’t present in previous versions. Unlike the earlier versions of Visual Studio that used a bitmap-based interface, Visual Studio 2010’s Windows Presentation Foundation–based IDE is vector based, which gives Visual Studio 2010’s IDE zoomability that wasn’t available in the bitmap-based interface. On a more subtle level the fonts are clearer and crisper. In addition, you can zoom in on parts of the interface, and you can add interface extensions from the Visual Studio Gallery at visualstudiogallery.msdn.microsoft.com/en-us.

The new IDE also sports several improved workability enhancements. For example, in Figure 2 you can see the improved highlight bar on the left side of the editing window that graphically shows the lines of code that have been changed. Visual Studio 2010 also has a new bracket matching feature. Positioning the cursor next to a code bracket automatically highlights the matching bracket. IntelliSense in Visual Studio 2010 supports two modes: statement completion and the new suggestion mode. Suggestion mode lets you use members before they’re defined. You can toggle between completion mode and suggestion mode using Ctrl+Alt+Spacebar.

Another important enhancement in the Visual Studio 2010 interface is its multiple monitor support. Previous versions of Visual Studio used a multiple-document interface (MDI) layout, in which all child windows were displayed with the frame of the parent IDE window. This approach didn’t let the IDE effectively take advantage of multiple monitors. The Visual Studio 2010 IDE allows free-floating windows that can be placed outside the borders of the main IDE. You can use Visual Studio 2010’s multiple monitor support to display the primary editor in your main monitor, then drag the Toolbox and other utility windows onto your additional monitors—keeping them out of the way and giving you more code editing real estate while simultaneously keeping your Toolbox and other windows handy and readily available. In addition, Visual Studio 2010 remembers the window layout you were using, so you can have one set of windows for development and a different window layout for debugging.

Visual Studio 2010 includes several other enhancements. A new Navigate To search feature in the toolbar lets you quickly search and identify strings across all the files in your project. If you enter a search string and press Enter, all the occurrences of the substring are highlighted in your code. Visual Studio 2010’s Snippet editor supports JScript. In addition, IntelliSense was added for JQuery.

Although the majority of my experiences with Visual Studio 2010’s interface were positive, I don’t like the product’s all-browser-based Help. The new Windows Presentation Foundation screen definitely looks cool, but I found the editing experience to be a bit slower and less crisp than in previous versions of Visual Studio.You also need to be aware that after you convert a Visual Studio 2008 project to Visual Studio 2010, you’ll no longer be able to open the project with Visual Studio 2008.

SharePoint Integration

Although you can use previous versions of Visual Studio to develop SharePoint applications, the process is far from easy. You have to use a combination of XML and ASP.NET and undergo a complex multistep process to build and deploy a SharePoint Web Part. Visual Studio 2010 provides SharePoint 2010–specific project templates that simplify SharePoint application development.

Visual Studio 2010's new project templates let you develop empty SharePoint applications, Visual Web Parts, Sequential Workflows, Business Data Connectivity Models, Event Receiver projects, and other SharePoint items. Visual Studio 2010 also provides the ability to debug SharePoint projects. In addition, you can now deploy SharePoint projects directly to SharePoint rather than having to use the old command-line Stsadm tool.

To make development a bit easier, SharePoint 2010 can now run on Windows 7, which lets you run Visual Studio 2010 and SharePoint 2010 on the same box. A new SharePoint Server Explorer lets you display all of the items in a SharePoint site. Finally, Visual Studio 2010 has a Feature Designer that lets you create SharePoint features and a Package Explorer that gives you a graphical view of what will be deployed.

Visual Studio 2010’s data access technologies have several enhancements. The Entity Framework 4 supports building data object models using either a data-first design, in which the data object framework is created from an existing database, or using the new model-first approach. As in previous versions of Visual Studio, the Entity Framework can then generate the code for the model in either VB or C#.

Many of the relational database tools that used to be found in the now defunct Visual Studio Team Edition for Database Professionalshave found their way into other members of the Visual Studio family. New options under the Premium and Ultimate Editions’ Visual Studio 2010 Data menu let you compare schema, compare data, edit and execute T-SQL statements, and view and synchronize database schema.

Debugging Enhancements

A useful new debugging feature is the ability to search for, label, and group breakpoints. You can use the tear-off breakpoint window to group together and label a set of related breakpoints. You can later search for these breakpoint labels, as well as enable and disable them as a group. Visual Studio 2010 also lets you export and import breakpoints via XML files, which lets you share sets of breakpoints with other developers. Figure 3 shows Visual Studio 2010’s tear-away debugging window for managing breakpoints.

Another useful new feature is the ability to pin DataTips in the debugger. To pin a DataTip you simply hover the mouse over the variable that you’re interested in and click the new pin button. This action causes the DataTip to always display in the debugging window. For more information about pinning DataTips, see “VS 2010 Debugger Improvements (BreakPoints, DataTips, Import/Export).”

The most important new debugging feature in Visual Studio 2010 is undoubtedly IntelliTrace. This feature lets you record the execution of a .NET application and then later replay it. In beta versions, IntelliTrace was referred to as Historical Debugging. This feature is designed to solve those frustrating nonrepo errors in which the developer can’t reproduce the errors seen by users or testers. IntelliTrace operates in the background, recording all the events that occurred in an application and letting the developer see events that occurred over the course of the application’s run and the context in which they occurred. All the IntelliTrace information is recorded automatically. IntelliTrace works with VB and C# applications that were built with the .NET Framework 2.0 and later. Figure 4 shows Visual Studio 2010’s new IntelliTrace feature; the IntelliTrace window is in the right-hand pane. This window displays events that occurred during the application’s execution. Clicking an event expands the description and reveals detailed information about the event. IntelliTrace is enabled by default for IntelliTrace events only; to capture all call information, select Debug, Options and Settings, IntelliTrace, then click the General tab. An important limitation I encountered is that IntelliTrace debugging is available only for x86 applications.

SketchFlow

The new SketchFlow feature is part of Visual Studio 2010 Ultimate. SketchFlow is a rapid prototyping tool that comes from the Expression product line. SketchFlow lets developers quickly create UIs for laying out forms and populating them with data; you can even design an application flow that controls and demonstrates how an application will move through multiple forms. The SketchFlow feature encourages user input in the design process because the developer and user can sit down and cooperatively create a working model. The developer can then use the SketchFlow model to generate a Visual Studio 2010 solution.

As you’d expect, the .NET Framework 4 brings several important new features to the table. The .NET Framework 4 supports in-process side-by-side execution, which lets applications load components that are based on earlier versions of the .NET Framework. In-process side-by-side execution works with .NET Framework 2.0 SP1 and later applications.

Another important new enhancement to the .NET Framework 4 is the change from concurrent to background garbage collection. Concurrent garbage collection degrades application performance; the change to background garbage collection improves .NET application performance.

Yet another big change in the .NET Framework 4 is support for the Dynamic Language Runtime (DLR) and its new System.Dynamic namespace. The DLR enables dynamic languages such as IronPython and IronRuby to run on top of the .NET Framework.

To better take advantage of today’s multicore processors, the .NET Framework 4 includes a new System.Threading.Tasks namespace that makes writing multithreaded applications easier. New support for web applications includes support for Model-View-Controller (MVC) applications and AJAX. Other notable enhancements in the .NET Framework 4 include a new System.Tuple class for supporting structured tuple objects. Finally, the .NET Framework 4 includes new System.Numerics.BigInteger and SystemNumerics.Complex numeric data types and support for memory-mapped files.

New Features Come at a Price

Visual Studio 2010 raises the bar for .NET application development. The new Windows Presentation Foundation–based interface, support for multiple monitors, enhanced SharePoint support, and IntelliTrace features set Visual Studio 2010 well above other development platforms and are significant improvements over previous versions. The inclusion of MSDN in Visual Studio 2010 is also a welcome feature. However, there’s no such thing as a free lunch—and the more full-featured editions of Visual Studio come with a price tag that might put them out of reach for many organizations.

From the Blogs

Duplicate records clutter databases and render the data within them unclear. This kind of problem is very common, and it’s the main reason that deduping software exists. But there’s another benefit to deduplication software: the ability to infer connections between individual records from various data sets....More

Companies looking to grow and extract value from their data are increasingly turning to Chief Data Officers (CDOs) to execute their data strategy. The role is new, and a playbook is necessary to address the many challenges CDOs face....More

After spending 20 years building analytics, BI and database solutions, I've focused on Cloud data solutions over the past 2 years. I've chosen 5 common challenges that I face every day with Cloud migrations and that you'll face in your Cloud BI projects....More